Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Status of a test
Used to get the status of a running test.
API
GET https://api.beaglesecurity.com/rest/v2/test/status?application_token={applicationToken}&result_token={result_token}
Required scope: read_test_status
Request headers
Name Value
Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request parameters
Name Type Description Required
application_token string A unique token for identifying the application in your account
result_token string A unique key for identify result session
Example request
curl --location --request GET \
'https://api.beaglesecurity.com/rest/v2/test/status?application_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&result_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();

// Get test status
String applicationToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
String resultToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
TestStatus testStatus = client.getTestStatus(applicationToken, resultToken);
Response
Name Type Description
status string Status of the test
Possible values are:
running Test is running
completed Test completed
progress string Percentage of test completed
code string Status code for the API call.
Values are:
SUCCESS API call is success
PLAN_NOT_SUPPORTED Your plan does not support this feature.
INVALID_SESSION Invalid session
FAILED Failed to get test status.
NOT_AUTHORIZED User authentication failed.
message string Success/failure message for the API call
Example response
{
"status": "running",
"progress":3,
"code": "SUCCESS",
"message": "Test is in progress."
}
{
"code": "FAILED",
"message": "Get status failed."
}