Get attachments reference API in Test Reporting & Analytics
Use this API to get attachment or screenshot in a specific test run.
get attachments reference
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-automation.browserstack.com/ext/v1/testRun/2326631359/attachments?pageSize=2&type=attachment"
-
cursor integer
Cursor for pagination.
-
page_size integer
The number of test runs to be returned in a single response is 30 by default, with a maximum of 100 and a minimum of 1.
-
type* String
Specifies whether to retrieve attachments or screenshots. Possible values are ‘ATTACHMENT’ and ‘SCREENSHOT’.
Response Attributes 200 OK JSON
Response
{
"urls": [
"https://observability-rails-preprod.bsstag.com/attachments/test-run-63df2cf3-82c9-48b8-a6c3-5768d39ee4ee/out.log?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAwaDGV1LWNlbnRyYWwtMSJIMEYCIQCEzX3EbKqoK49N%2FjXKc1W2rEdcGvmdSvswExBW7mJ%2F%2FQIhAJSLATMrL2CDeE9VjdR%2B7iEyGBMwobHfKySG%2Fkfid951KpgFCNX%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMNzM3OTYzMTIzNzM2Igy80i9vrp3kPVz5ajMq7AR3rN75zow2YRgRbDVf7hMy9dFvEDW2U%2BZqbBjgg%2BnaGdIK1mX9MocRZOxwu1tVUeW0e%2F0bx6ZibP%2FwqoqZ8apl0FgeynWGGLWrrL6Pghd%2BPXURyX00Fm3JeKFM9ih1KQ4NZUued8KBAPga%2B4aDZ%2B7TSNwou9DpJBWWZyHqaqPmA9b7%2BPYZ4geWDmMLWQ%2F5tfaeqCZ4rQoMEbaISzEhhA3UTB3vsY7lH%2FZvyeEZdH6GTx0So33xOLHjl8s3BCoTCalXpeVBLLRyOoDgGHQpDB7x9LWN1K3QjHltgO54XH1NoMHoIroKu1oel0GXy%2BgD9sGmGoQUACUL5Rr8UixtOUNXZwjH58lt7o5MZJIdwni%2B0anKHbNb9Yb3NYp%2BLjEZp7DSppHZibLcZPvhw4BPQAW%2BtYgobmS%2BmlP8HZyfwTcIHPHKpmYg8oUNIE2W%2FRU4TYBRAfLFyRqHL7vnPyU9Wb10T3NCmP9GLyBHSDTM%2FrrgtPNd2ujKwhNVTaQPkzbo7FSyPKkqjWhpIFlYIGQS%2BICu%2BIWl5hLLrUU2C5cnKWYiNYRDBe4fAo5zC7hh6aSi0A5qkSQigcoXAWh7Ibi9MOcNCwEt1WKksNZ3uvYOvPhnEUWD6b3DBdln5oAn4SCcmOoZpkLmWmmcOlqusRyvIq8ZVQTW1Wj0Zu%2FfurhL%2BNROcMJetn20srtjSKL%2Foy%2F27H3f%2Bwi2LzU1vAo4N7%2BvpryA6e5Asf3yyX8Rab0zi%2FS4vcao7Ex8h6lIjh1SbCgRxQRcPD%2Fsgx%2BwLd6HRYHJtUpf6XspU4lrrXca1SVQlsdNHsIbPMjXvoV85G21%2FTDzuuXJBjqYAeljIpYO0uXx23oKaGP%2BO3xJDUX%2BQ1jK6DYhois%2FP%2FIU6KFUlBkhCWk3%2FcXrxcSqmKm8BuFNKIS7TdL9nbYXcupCc0dqWqWDBNHVc%2FlxNGC8Mq0yu6bOIS7ZdRbX3mNIEJG%2B4Ovk%2BZURciGJ5X38nMgr6oswVXm90OHKQPE%2FyhRHhKXeOcadOpivaGpiLMgb35BKyzoAa2gd&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20251210T114652Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7199&X-Amz-Credential=ASIA2XUQHUQMLHKZGZMC%2F20251210%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=70564e452574f9b1acee7e6af153f64f1531e35a5161e78a2c91b1db83d62e61"
],
"pagination": {
"pageSize": 1,
"nextCursor": "1draQGf1pWccpuuYKUGzEzrf1iymk1yRzx1TQEPdTSBRrGTNAmf2T1wIWD0mAHHgYxDC+MmMOGsatNXPYrIbNYQRmmYXK2b5HMXmEeEZD5wBxYZ7QaM6ndh73P6SupEQoxu3xXx1yPoxj3VdDfg6cw6xgVk3OMF+6wSDdvHodtEk=",
"hasMore": true,
"totalCount": 50
}
}
-
urls Array
URLs of attachments or screenshots in test runs
-
pagination JSON Object
â–¶ SHOW VALUESPagination information
-
pageSize Integer
The number of items (attachments or screenshots) returned in the current response.
-
nextCursor String
Next cursor to be used to fetch the next set of results.
-
hasMore Boolean
Denotes whether there are more results to be fetched or not.
-
totalCount Integer
Total number of attachments or screenshots available.
-
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.