Upload app clients using Detox Android via App Automate API
Upload and manage your app clients for automated Detox Android testing using the BrowserStack App Automate API. Test React native apps on real mobile devices.
To test your React native apps on BrowserStack using Detox Android, you first need to upload an Android app (.apk/.aab file) to BrowserStack servers. Use our REST API endpoints to upload and manage your apps on BrowserStack.
Upload an app client
Upload the app client under test for Detox Android testing. The supported file formats are .apk and .aab files for Android. You can upload an app from filesystem (if the app resides on your local machine or CI/CD server).
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/detox/v2/android/app-client" \
-F "file=@/path/to/app/file/DetoxSampleReactNativeTest.apk" \
-F "custom_id=SampleApp"
-
file File
File to upload. Ensure that the request’s content type is set to
multipart/form-data. In cURL, you can do this using-Foption. Eitherfileorurlparameter is required. -
url String
Remote URL to your app. Ensure that its a publicly accessible URL as BrowserStack will attempt to download the app from this location. Either
fileorurlparameter is required. -
custom_id String
Custom ID for the app. If you want to use a constant value to specify the application under test and don’t want to modify your scripts after every build upload, you can define a custom ID for your app. Use the same custom ID every time you upload a new build of the app. Accepted characters are
A-Z,a-z,0-9,.,-,_. All other characters are ignored. Character limit is 100.
Response attributes 200 application/json
Response
{
"app_client_name": "DetoxSampleReactNativeTest.apk",
"app_client_url": "bs://f39975bcdc2d50617ebe9f26be6e7d1d6de34a99",
"app_client_id":"4db67d9ddf8546dd79f3b1796f6bfafd140d35c0",
"uploaded_at": "2024-01-18 11:12:17 UTC",
"expiry": "2024-02-17 11:12:17 UTC",
"custom_id": "SampleApp"
}
-
app_client_name String
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Detox test scripts.
Example: “DetoxSampleReactNativeApp.apk” -
app_client_url String
Unique URL identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Detox test scripts.
Example:bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3 -
uploaded_at String
The date and time of the app upload.
Example: “2024-01-19 11:09:12 UTC” -
custom_id String
Custom ID defined for the uploaded app client in the API request..
Example:SampleApp. Accepted characters areA-Z,a-z,0-9,.,-,_. All other characters are ignored. Character limit is 100. -
expiry String
Date when the upload expires. The app client you uploaded gets deleted from the server after 30 days.
Example: “2024-02-18 11:09:12 UTC”
List uploaded app clients
Retrieve a list of recently uploaded app clients. By default, it returns the last 10 uploaded app clients from your BrowserStack group.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/detox/v2/android/app-clients"
# List recent app clients using customID
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/detox/v2/android/app-clients?custom_id=SampleApp"
# Show app clients uploaded by you using the "scope" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/detox/v2/android/app-clients?scope=user"
# Limit the number of app clients to be displayed using the "limit" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/detox/v2/android/app-clients?limit=5"
# Fetch app clients starting from a specific position using the "offset" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/detox/v2/android/app-clients?limit=10&offset=20"
-
custom_id String
Filter uploaded app clients by custom ID. Accepted characters are
A-Z,a-z,0-9,.,-,_. All other characters are ignored. The character limit is 100. -
scope String
Show recent app clients at a group level or user level. The possible values:
Value Description groupShow app clients uploaded by any user within your BrowserStack group. This is the default behaviour. userShow app clients uploaded by you -
limit String
Number of recent app clients to fetch. The default value is 10.
-
offset String
Fetch app clients starting from a specific position in the list. Use together with
limitto paginate through results.
Response attributes 200 application/json
Response
{
"app_clients": [
{
"app_client_name": "DetoxSampleReactNativeTest.apk",
"app_client_url": "bs://f39975bcdc2d50617ebe9f26be6e7d1d6de34a99",
"app_client_id": "4db67d9ddf8546dd79f3b1796f6bfafd140d35c0",
"uploaded_at": "2024-01-18 11:12:17 UTC",
"custom_id": "SampleApp",
"expiry": "2024-02-17 11:12:17 UTC"
},
{...}
]
}
-
app_clients Array
▶ SHOW VALUESList of recently uploaded app clients.
-
app_client_name String
Filename of the uploaded app client.
-
app_client_url String
Unique URL identifier returned upon successful upload of your app client on BrowserStack. This value can be used later to specify the app client under test in your Detox test scripts.
Example:bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3 -
app_client_id String
Unique identifier returned upon successful upload of your app client on BrowserStack.
Example:4db67d9ddf8546dd79f3b1796f6bfafd140d35c0 -
uploaded_at String
App client upload timestamp.
-
custom_id String
Custom ID defined for the uploaded app client.
Example:SampleApp. Accepted characters areA-Z,a-z,0-9,.,-,_. All other characters are ignored. Character limit is 100. -
expiry String
By default, an uploaded app client expires in 30 days. Upon expiry, the uploaded app client is deleted from BrowserStack servers and thus can no longer be tested.
-
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.