Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Get all running tests of a logged-in user
Used to get the running tests of a user who is logged in to their account.
API
GEThttps://api.beaglesecurity.com/rest/v2/test/runningsessions
Required scope: read_test_result
Request headers
| Name | Value |
|---|---|
| Authorization | Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Example request
curl --location --request GET \
'https://api.beaglesecurity.com/rest/v2/test/runningsessions' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();
// Get all running test sessions
List<TestSession> testSession = client.getTestRunningSessions();
Response
| Name | Type | Description |
|---|---|---|
| sessions | array | List of test session objects |
| 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 get test sessions.
NOT_AUTHORIZEDUser authentication failed.
|
| message | string | Success/failure message for the API call |
Example response
{
"code": null,
"message": null,
"sessions": [
{
"title": "Example 1",
"url": "https://example1.com",
"applicationToken": "f6weim5t7h2f1m855l85pms5bsn0kgw4",
"resultToken": "lkjvfdsavgldba678w2bh2brfwfwfwgb",
"startTime": 1628712549237,
},
{
"title": "Example 2",
"url": "http://example2.com",
"applicationToken": "ljh465jgjl62g2lujg642kjg764264rj",
"resultToken": "3qy7cuy69nis0lp0p988c0df8om2mn90",
"startTime": 1630740413141,
},
{
"title": "Example 3",
"url": "http://example3.com",
"applicationToken": "9quf44bokfy0vto2kjlmush2zglr9wn7",
"resultToken": "3c7gnxoisjw3ys3b2s5fcbbr9ud3rtku",
"startTime": 1630742949524,
}
]
}
{
"code": "FAILED",
"message": "Get result failed"
}
{
"code": "NOT_AUTHORIZED",
"message": "Not authorized"
}