Get test case report issues API in Automated tests
Use this API to get the accessibility issues found in a test case of an Automated tests build. The API returns a link to a CSV report with one issue per row. Each row lists the WCAG success criteria that the issue violates.
How this API works
This API generates the report in the background. You call this endpoint once to start generating the report, and again to get the report link. To get the report for a test case, follow these steps:
- Get the build ID,
thBuildId, from the response of the Get build list API. - Get the test case ID from the
idfield in the response of the Get test case list API. - Call this endpoint with the
test_caseparameter to start generating the report. The response includes the task ID in thedata.task_idfield. - Call this endpoint again with the
task_idparameter. If the report is ready, the response includesreport_link. If not, wait a few seconds and call the endpoint again with the sametask_id. - Download the CSV file from
report_link. TheGuideline(s)column lists the WCAG success criteria for each issue, for example,SC 1.4.3.
Pass the complete
task_idstring, for example,ext_api_issues:TestCase:afd17c69-2b80-4a3f-abb1-f427f8d71093:1793972975. The number at the end of the string is a timestamp, not the task ID.
A
task_idexpires two hours after it is created. After that, call this endpoint with thetest_caseparameter again to get a newtask_id. Thereport_linkis a signed URL that expires after 12 hours, so download the CSV file before then.
You can also get the issues from an Automated tests build in an AI assistant, such as Claude or Cursor. When you ask in natural language, the fetchAccessibilityIssues tool of the BrowserStack MCP server fetches the issues. For supported workflows, see Reports and issues tools in the BrowserStack MCP server.
get test case report issues
If Geo Region Restriction (GRR) is enabled for your account, add your region code to the host name:
api-accessibility-<region>.browserstack.com. See Geo Region Restriction endpoints for the region codes and examples.
Request parameters
Request to start generating the report
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://api-accessibility.browserstack.com/api/automated-tests/v1/builds/{thBuildId}/issues?test_case={test_case_id}"
Response with the task ID
{
"success": true,
"data": {
"task_id": "ext_api_issues:TestCase:afd17c69-2b80-4a3f-abb1-f427f8d71093:1793972975",
"message": "CSV file link generation has been initiated."
},
"error": null
}
Request to get the report link
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://api-accessibility.browserstack.com/api/automated-tests/v1/builds/{thBuildId}/issues?task_id={task_id}"
-
test_case String
ID of the test case. Use the
idvalue from the Get test case list API response. Required in the first call, which starts generating the report. The response includes the task ID in thedata.task_idfield. -
task_id String
Complete task ID returned by the first call, for example,
ext_api_issues:TestCase:<uuid>:<timestamp>. Required in later calls, which get the report link. A task ID expires two hours after it is created. -
next_page String
Used to fetch subsequent pages from the API when has_next parameter is true. Pass the next_page reference received in the response of last request.
Response Attributes 200 OK JSON
When you call this endpoint with a task_id and the report is ready, the API returns the following response.
Response with the report link
{
"name": "BStack Sample Test - Add product to cart",
"tags": null,
"file": "/src/test/resources/features/sample.feature",
"scopeList": [
"browserstack-demo"
],
"osData": {
"name": "OS X",
"version": null,
"logo": "mac"
},
"browserData": {
"name": "chrome",
"version": "131.0.6778.70",
"logo": "chrome"
},
"report_link": "<CSV_file_link>"
}
-
name String
Name of the test case.
-
tags String
Any tag associated with the test case.
-
file String
The path of the filename that houses the test case.
-
scopeList Array
An array of strings that describes the scope of the test case.
-
osData Object
▶ SHOW VALUESContains details about the OS on which the test case was run.
-
name String
Name of the OS used.
-
version String
Version of the OS used.
-
logo Object
Brand name of the OS used.
-
-
browserData Object
▶ SHOW VALUESContains details about the browser on which the test case was run.
-
name String
Name of the browser used.
-
version String
Version of the browser used.
-
logo String
Brand name of the browser used.
-
-
report_link String
Signed link to the CSV report, returned when the report is ready. Each row is one issue, and the
Guideline(s)column lists its WCAG success criteria. The link expires after 12 hours. -
pagination Object
▶ SHOW VALUESContains information to facilitate fetching additional records if they exist.
-
has_next Boolean
True if there are more records to fetch. False if the current response is the last page of records.
-
next_page String
A reference to the next page. Pass this as a request parameter in the subsequent request as “next_page” to get the next page of records.
-
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.