Usage Analytics API Endpoints
Use the Usage Analytics API methods to retrieve information about your concurrency usage that you can then use to populate a dashboard that is meaningful for your organization.
Refer to Getting Started for Authentication and Server information.
Organization Concurrency
GET/usage-analytics/v1/concurrency/org
- maximum, minimum concurrency for given granularity (monthly, weekly, daily, hourly),
- teams' share for the organization maximum concurrency for given granularity (in percentage),
- current limits.
- Virtual Cloud:
- virtual machines,
- mac virtual machines,
- mac arm virtual machines,
- total virtial machines, combining all resource types.
- Real Device Cloud:
- private devices,
- public devices,
- total virtial machines, combining all resource types.
Parameters
This call requires org_id
parameter.
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
vdc |
granularity | | QUERY | OPTIONAL | STRING | Return results grouped by given granularity:
daily |
resource_type | | QUERY | OPTIONAL | STRING | Return results only for given resource type For the Virtual Could tests:
|
start_date | | QUERY | DATE | The starting date of the period during which the test runs executed, in |
end_date | | QUERY | DATE | The ending date of the period during which the test runs executed, in |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/usage-analytics/v1/concurrency/org?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/usage-analytics/v1/concurrency/org?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. |
{
"by_org": {
"org_id": "string",
"data": [
{
"time": "string",
"values": [
{
"resource_type": "virtual_machine",
"concurrency": {
"max": 0,
"min": 0,
"max_org_concurrency_team_share": [
{
"team_id": "string",
"pct": 0,
"avg_concurrency": 0
}
]
},
"limits": {
"total": 0,
"resource": 0,
"total_original": 0,
"resource_original": 0
}
}
]
}
]
}
}
Teams Concurrency
GET/usage-analytics/v1/concurrency/teams
- maximum, minimum concurrency for given granularity (monthly, weekly, daily, hourly),
- current limits.
- Virtual Cloud:
- virtual machines,
- mac virtual machines,
- mac arm virtual machines,
- total virtial machines, combining all resource types.
- Real Device Cloud:
- private devices,
- public devices,
- total virtial machines, combining all resource types.
Parameters
This call requires org_id
and team_id
parameters.
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
team_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
vdc |
granularity | | QUERY | OPTIONAL | STRING | Return results grouped by given granularity:
daily |
resource_type | | QUERY | OPTIONAL | STRING | Return results only for given resource type For the Virtual Could tests:
|
start_date | | QUERY | DATE | The starting date of the period during which the test runs executed, in |
end_date | | QUERY | DATE | The ending date of the period during which the test runs executed, in |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/usage-analytics/v1/concurrency/teams?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/usage-analytics/v1/concurrency/teams?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. |
{
"by_team": [
{
"team_id": "string",
"data": [
{
"time": "string",
"values": [
{
"resource_type": "virtual_machine",
"concurrency": {
"max": 0,
"min": 0,
"max_org_concurrency_team_share": [
{
"team_id": "string",
"pct": 0,
"avg_concurrency": 0
}
]
},
"limits": {
"total": 0,
"resource": 0,
"total_original": 0,
"resource_original": 0
}
}
]
}
]
}
]
}