Last modified on October 21, 2020

Get device concurrency slots

Depending on your subscription plan, you can run automated tests on one or multiple devices in parallel. To get the number of ongoing and available device sessions, send a GET request to /accounts/{accountId}/concurrency-status with a JSON body containing the needed account ID.

The operation is available only for Admin users and account owners.

Request URL

GET https://cloud.bitbar.com/api/v2/accounts/{accountId}/concurrency-status

Authentication

This operation requires authentication.

Parameters

accountId

The ID of the account whose data you want to get.

{
    "accountId": 112233
}

Response body

On success, the operation returns HTTP status 200 and the following JSON:

{
  "id": 112233,
  "selfURI": null,
  "runningSessions": 0,
  "waitingSessions": 1,
  "sessions": 1,
  "accountConcurrency": null,
  "mainUserEmail": "demo.user@example.com",
  "unlimitedConcurrency": true
}

Where:

id

The account ID.

runningSessions

The number of currently running device sessions.

waitingSessions

The number of device sessions in a waiting state.

sessions

The sum of runningSessions and waitingSessions

mainUserEmail

The account owner's email.

unlimitedConcurrency

Shows whether the user has unlimited concurrency.

If accountConcurrency is a number and unlimitedConcurrency is false, the user is charged for concurrency and has a limit of it.

If accountConcurrency is null and unlimitedConcurrency is true, the user is charged for minute usage.

If accountConcurrency is null and unlimitedConcurrency is false, the user has no subscription (including trial) and is unable to run tests.

Error responses have a non-200 status code and show errors:

{
  "message": "Resource '/api/v2/accounts/112233/concurrency-status' does not exist",
  "statusCode": 404
}

Try it out

Click here to test this operation in the BitBar interactive API console.

See Also

Bitbar REST API

Highlight search results