Access Usage Reports using REST API to analyze how your team members are using BrowserStack
Usage Reports provide valuable insights into your BrowserStack utilization. They help you with the necessary information to make efficient decisions regarding the allocation and usage of parallel resources and user licenses among teams and individuals.
You can access usage reports on BrowserStack UI from Test Insights console:
Alternatively, if you prefer to automate the retrieval and consumption of Usage Reports, you can utilize the REST API endpoints. These endpoints offer the capability to retrieve the following reports related to your organization’s BrowserStack usage:
- User Reports (for usage details at individual users’ level)
- Team Reports (for usage details at Team level)
Note the owner has access to invoke any of these API for any member in their organization account on BrowserStack. However, if teams are created, then team admins can invoke these endpoints only for their respective team members.
What you need to do
Usage reports APIs use a shared job queue (for both User and Team reports) in order to generate the desired reports. To retrieve a report, you can follow these three simple steps:
- Begin by creating a job using one of the
create-jobendpoints. Upon job creation, you will receive a
job_idin response (You can use this
job_idto monitor its status, retrieve the generated report, or cancel the job).
- Once created, the jobs will be automatically enqueued and processed for report generation. You can check the status of a job using one of the
- Once a job moves to
completedstate, you can use the ‘get report’ end points to retrieve the generated reports.
Frequently asked questions
Q. Is there a time frame limit for which I can fetch Usage reports?
- Usage reports can be fetched for a maximum duration of 6 months from the current date.
- Moreover, once a report is generated, it will be retained for 5 days, during which you can instantly retrieve it using the corresponding
job_id. Post 5 days, you will be required to initiate the report generation process again.
Q. Is there a restriction on the frequency of fetching Usage reports within a day?
Yes, there is. To prevent unintended misuse, the Usage Reports APIs have rate limits as outlined below:
- Each user is allowed to initiate up to 5 report generation requests simultaneously (including both those being processed and those in the queue).
- Any additional requests for report generation beyond this limit will be dropped until one of the ongoing jobs is completed.
- Additionally, each user can initiate up to 10 jobs per day for report generation. (this count includes requests that are either being processed, enqueued, or have already been completed only).
Q. My queue is at capacity. How can I empty it to handle additional reports?
You can delete jobs that havev been scheduled to reduce the number of concurrent/ enquued jobs. To delete an existing job, simply pass the
job_id to the corresponding
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.