Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Start a test
Used to start a test.
API
POSThttps://api.beaglesecurity.com/rest/v2/test/start
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/start' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"applicationToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();

// Start a test
String applicationToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
StartTest startTestResult = client.startTest(applicationToken);
Response
Name Type Description
code string Status code for the API call.
Values are:
SUCCESSAPI call is success
INVALID_SESSIONInvalid session
FAILEDFailed to start test.
NOT_AUTHORIZEDUser authentication failed.
statusUrl string URL for getting test status
resultUrl string URL for getting test result
resultToken string A unique key for identify result session
message string Success/failure message for the API call
Example response
{
"code": "SUCCESS",
"statusUrl": "https://api.beaglesecurity.com/rest/v2/test/status",
"resultUrl": "https://api.beaglesecurity.com/rest/v2/test/result",
"resultToken": "1ry0hrn7bt8kwiuayrul7a2ka8vp7if5",
"message": "Test has been started successfully."
}
{
"code": "FAILED",
"message": "Start test failed"
}
{
"code": "NOT_AUTHORIZED",
"message": "Not authorized"
}