Upload apps using Detox Android via App Automate API
Upload and manage your apps 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
Upload the application under test (AUT) 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" \
-F "file=@/path/to/app/file/DetoxSampleReactNativeApp.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 attempts 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_name": "DetoxSampleReactNativeApp.apk",
"app_url": "bs://f39975bcdc2d50617ebe9f26be6e7d1d6de34a99",
"app_version": "1.0",
"app_id": "f39975bcdc2d50617ebe9f26be6e7d1d6de34a99",
"uploaded_at": "2024-01-18 11:12:17 UTC",
"expiry": "2024-02-17 11:12:17 UTC",
"custom_id": "SampleApp"
}
-
app_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:bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3 -
app_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 -
app_version String
The version of the app uploaded.
Example: “1.0” -
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 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 you uploaded gets deleted from the server after 30 days.
Example: “2024-02-18 11:09:12 UTC”
List uploaded apps
Retrieve a list of recently uploaded apps. By default, it returns the last 10 uploaded apps 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/apps"
# List recent apps using customID
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/detox/v2/android/apps?custom_id=SampleApp"
# Show apps 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/apps?scope=user"
# Limit the number of apps 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/apps?limit=5"
# Fetch apps 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/apps?limit=10&offset=20"
-
custom_id String
Filter uploaded apps by custom ID. Accepted characters are
A-Z,a-z,0-9,.,-,_. All other characters are ignored. Character limit is 100. -
scope String
Show recent apps at a group level or user level. The possible values:
Value Description groupShow apps uploaded by any user within your BrowserStack group. This is the default behaviour. userShow apps uploaded by you -
limit String
Number of recent apps to fetch. The default value is 10.
-
offset String
Fetch apps starting from a specific position in the list. Use together with
limitto paginate through results.
Response attributes 200 application/json
Response
{
"apps": [
{
"app_name": "DetoxSampleReactNativeApp.apk",
"app_url": "bs://f39975bcdc2d50617ebe9f26be6e7d1d6de34a99",
"app_version": "1.0",
"app_id": "f39975bcdc2d50617ebe9f26be6e7d1d6de34a99",
"uploaded_at": "2024-01-18 11:12:17 UTC",
"custom_id": "SampleApp",
"expiry": "2024-02-17 11:12:17 UTC"
},
{...}
]
}
-
apps Array
▶ SHOW VALUESList of recently uploaded apps.
-
app_name String
Filename of the uploaded app.
-
app_url String
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test for your test execution.
Example:bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3 -
app_version String
Version of the uploaded app.
-
app_id String
Unique identifier returned upon successful upload of your app on BrowserStack.
Example:c8ddcb5649a8280ca800075bfd8f151115bba6b3 -
uploaded_at String
App upload timestamp.
-
custom_id String
Custom ID defined for the uploaded app.
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 expires in 30 days. Upon expiry, the uploaded app 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.