Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Local Testing API for debugging multiple binaries

Use the Local Testing API to check the status of multiple active Local binaries or disconnect them.

If you are using your account to test multiple applications or builds, we recommend setting up a separate Local Testing connection for each. Local Testing API helps manage and debug these connections.

Enable the Local Testing API

To enable the Local Testing API, start your Local Testing connections with the --enable-logging-for-api parameter. For more information, see Flags for Local.

  • The Local Testing API accepts up to 20 requests every 5 minutes.
  • For these APIs to include a binary in results, start the binary with the --enable-logging-for-api parameter. For example, ./BrowserStackLocal --key YOUR_ACCESS_KEY --enable-logging-for-api <other_params>.
  • If you don’t use the --enable-logging-for-api parameter, the response does not include that binary. BrowserStack still records the binary instance, without any sensitive information.

Get a list of active binary instances

Run the following command through your command-line interface:

Usage: GET /local/<version>/list

Command line
Copy icon Copy
Parameters Value
version
The version of the API to be used.
Current version is v1
last
The number of recent binary instances to be listed.
Default:20, Maximum value: 100
state
Configures to list whether all binary instances or currently running instances.
all, running
default: running

On success, the API returns response code 200.

Response
Copy icon Copy

Retrieve details of an active binary instance using its ID

Usage: GET /local/<version>/<id>

Command line
Copy icon Copy
Parameters Value
version
The version of the API to be used.
Current version is v1
id
The Binary id that needs to be retrieved
String value

On success, the API returns response code 200.

Response
Copy icon Copy

Errors

Response code/Description Response message
401
Authentication failed due to incorrect token.
{“error”: “Invalid auth token”}
422
The ID requested for is incorrect.
{“error”: “Incorrect id”}
503
There was an exception.
{“error”: “Something went wrong, please try again after sometime”}

Disconnect an active binary using its ID

Usage: DELETE /local/<version>/<id>

Command line
Copy icon Copy
Parameters Value
version
The version of the API to be used.
Current version is v1
id
The Binary id that needs to be retrieved
String value

On success, the API returns response code 200.

Response
Copy icon Copy

If the binary is already disconnected, the message is QUERTY1 was already disconnected.

Errors

Response code/Description Response message
401
Authentication failed due to incorrect token.
{“error”: “Invalid auth token”}
422
The ID requested for is incorrect.
{“error”: “Incorrect id”}
500
There was an exception.
{“error”: “Failed to disconnect, please try again. Contact us if the issue is persistent.”}

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.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

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.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle