Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Stop a test
Used to stop a test.
API
POSThttps://api.beaglesecurity.com/rest/v2/test/stop
Required scope: run_test
Request headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Request body
| Name | Type | Description | Required |
|---|---|---|---|
| applicationToken | string | A unique token for identifying the application in your account |
Example request
curl --location --request POST \
'https://api.beaglesecurity.com/rest/v2/test/stop' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"applicationToken": "3frv64jxnaa89okc20jfyys1n8dwhgnx"
}'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();
// Stop a test
String applicationToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
Boolean testStatus = client.stopTest(applicationToken);
Response
| Name | Type | Description |
|---|---|---|
| code | string |
Status code for the API call.
Values are:
SUCCESSAPI call is success
PLAN_NOT_SUPPORTEDYour plan does not support this feature.
INVALID_SESSIONInvalid session
FAILEDFailed to stop test.
NOT_AUTHORIZEDUser authentication failed.
|
| message | string | Success/failure message for the API call |
Example response
{
"code": "SUCCESS",
"message": "Success"
}
{
"code": "FAILED",
"message": "Stop test failed."
}
{
"code": "NOT_AUTHORIZED",
"message": "Not authorized"
}