Usage reports
Create user report job
Initiates a job for generating a user report using the provided user parameters, and returns a job_id
in response.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/reports/usage/v1/user"
- No parameter is required.
- If
startDate
andendDate
filters are not specified, reports are returned with usage data from the last two weeks.
Response attributes 200
application/json
Response
{
"success": true,
"message": "Report is successfully queued.",
"data": {
"job_id": "aabe52c63dg624c8744ab5h9"
}
}
-
success String
status
-
message String
Status message
-
data Object
Details of the job created
-
job_id String
Unique Identifier of the job created.
-
Get user report job status
This endpoint can be used to track the status of a job created to retrieve a user report.
Once the job transitions to the completed
state, you can then proceed to retrieve the report.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.co/reports/usage/v1/user/{job_id}/status"
-
job_id* String
Identifier of the corresponding job created.
Response attributes 200
application/json
Response
{
"success": true,
"status": "enqueued",
"message": "Request enqueued successfully"
}
-
success String
List of activities
-
status String
Current status of the job
Get user report
Retrieve the user report that has been generated.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.com/reports/usage/v1/user/{job_id}"
-
job_id* String
Unique Identifier of the corresponding job created.
Response attributes 200
application/json
Response
{
"success": true,
"message": "Success",
"data": {
"users": [
{
"name": "Steve",
"email": "steve@example.com",
"role": "Owner",
"team": "Acme Inc. (Org)",
"product_access": {
"live_testing": true,
"automate": false,
"app_live_testing": true,
"app_automate": false
},
"usage": {
"last_activity": "2023-06-30T11:33:40+00:00",
"last_test": "2023-06-30T11:33:40+00:00",
"product_data": {
"live_testing": {
"tests_run": 10,
"minutes_used": 180
},
"app_live_testing": {
"tests_run": 10,
"minutes_used": 120
},
"automate": {
"tests_run": 10,
"cypress_executions_run": 5,
"current_parallels_allocated": 5,
"max_parallels_used": 2,
"parallel_consumption_type": "org"
},
"app_automate": {
"tests_run": 10,
"current_parallels_allocated": 3,
"max_parallels_used": 2,
"parallel_consumption_type": "team"
}
}
}
}
]
}
}
-
success String
Status
-
message String
Success/failure message description
-
data Object
User Report data
-
users Array[Object]
Array of members’ identity and usage details
-
name String
Name of the member.
-
email String
Email of the member.
-
role String
Role of the member.
-
team String
Name of the Team to which the member belongs.
-
product_access Object
Product access details for the member
-
live_testing Boolean
Value is set to
true
if product-access to Live is enabled for the member. -
automate Boolean
Value is set to
true
if product-access to Automate is enabled for the member. -
app_live_testing Boolean
Value is set to
true
if product-access to App Live is enabled for the member. -
app_automate Boolean
Value is set to
true
if product-access to App Automate is enabled for the member.
-
-
usage Object
Usage details of the member
-
last_activity String
Timestamp of member’s last activity on BrowserStack. This will be the latest of last login, test performed, or activity on /account section.
-
last_test String
Timestamp of member’s last test on BrowserStack.
-
product_data Object
Member’s usage details across different products
-
live_testing Object
Product usage for Live. This will be returned only if the applied product filter is either “All-Products” or “Live”.
-
app_live_testing Object
Product usage for App Live. This will be returned only if the applied product filter is either “All-Products” or “App-Live”.
-
automate Object
Product usage for Automate. This will be returned only if the applied product filter is either “All-Products” or “Automate”.
-
app_automate Object
Product usage for App Automate. This will be returned only if the applied product filter is either “All-Products” or “App-Automate”.
-
-
-
-
Delete user report job
Using this API, you can dequeue a user report job that was created earlier, to reduce the total number of concurrent jobs within the queue.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE "https://api.browserstack.co/reports/usage/v1/user/{job_id}/status"
-
job_id* String
Identifier of the corresponding job created.
Response attributes 200
application/json
Response
{
"success" :true,
"message": "Report is successfully removed from queue."
}
-
success String
success/failure message
-
message String
Report is successfully removed from queue.
Create team report job
Use this API to create a job for generating a team report. On successful completion, this API enques the job and returns a job_id
in response.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/reports/usage/v1/team"
No parameter is required.
Response attributes 200
application/json
Response
{
"success": true,
"message": "Report is successfully queued.",
"data": {
"job_id": "aabe52c63dg624c8744ab5h9"
}
}
-
success String
status
-
message String
Status message
-
data Object
Details of the job created
-
job_id String
Unique Identifier of the job created.
-
Get team report job status
Using this endpoint, you can track the status of a job created to retrieve a team report.
Once the job moves to completed
state, you can proceed to retrieve the corresponding team report.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.co/reports/usage/v1/team/{job_id}/status"
-
job_id* String
Identifier of the corresponding job created.
Response attributes 200
application/json
Response
{
"success": true,
"status": "enqueued",
"message": "Request enqueued successfully"
}
-
success String
List of activities
-
status String
Current status of the job
Get team report
Retrieve the user report that has been generated.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.com/reports/usage/v1/user/{job_id}"
-
job_id* String
Unique Identifier of the corresponding job created.
Response attributes 200
application/json
Response
{
"success": true,
"message": "Success",
"data": {
"teams": [
{
"name": "Acme team",
"user_count": 10,
"type": "org",
"product_access": {
"live_testing": false,
"automate": true,
"app_live_testing": false,
"app_automate": true
},
"usage": {
"last_test": "2023-06-30T11:33:40+00:00",
"product_data": {
"live_testing": {
"minutes_used": 180
},
"app_live_testing": {
"minutes_used": 120
},
"automate": {
"current_parallels_allocated": 5,
"max_parallels_used": 2,
"parallel_consumption_type": "team"
},
"app_automate": {
"current_parallels_allocated": 3,
"max_parallels_used": 2,
"parallel_consumption_type": "team"
}
}
}
}
]
}
}
-
success String
Status
-
message String
Success/failure message description
-
data Object
User Report data
-
teams Array[Object]
Array containing the usage details for each team, where the reported data represents the cumulative usage of all the team members.
-
name String
Name of the Team.
-
user_count Integer
Count of members in the team.
-
type String
This value will be set to “org” for root of your organization’s account on Browserstack. For team’s within that account, value is set to “team”.
-
product_access Object
High level product access details of members within the team.
-
live_testing Boolean
Value is set to
true
if product-access to Live is enabled for the member. -
automate Boolean
Value is set to
true
if product-access to Automate is enabled for the member. -
app_live_testing Boolean
Value is set to
true
if product-access to App Live is enabled for the member. -
app_automate Boolean
Value is set to
true
if product-access to App Automate is enabled for the member.
-
-
usage Object
Combined usage details of all members within the team.
-
last_activity String
Timestamp of the team’s last activity on BrowserStack. This will be the latest of team members’ last login, test performed, or activity on /account section.
-
product_data Object
Details of team’s usage across different products
-
live_testing Object
Product usage details for Live. This will be returned only if the applied product filter is either “All-Products” or “Live”.
-
app_live_testing Object
Product usage details for App Live. This will be returned only if the applied product filter is either “All-Products” or “App-Live”.
-
automate Object
Product usage details for Automate. This will be returned only if the applied product filter is either “All-Products” or “Automate”.
-
app_automate Object
Product usage details for App Automate. This will be returned only if the applied product filter is either “All-Products” or “App-Automate”.
-
-
-
-
Delete team report job
Using this API, you can dequeue a team report job that was created earlier, to reduce the total number of concurrent jobs within the queue.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE "https://api.browserstack.co/reports/usage/v1/user/{job_id}/status"
-
job_id* String
Identifier of the corresponding job created.
Response attributes 200
application/json
Response
{
"success": true,
"message": "Report is successfully removed from queue."
}
-
success String
success/failure message
-
message String
Report is successfully removed from queue.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.