Skip to main content
No Result Found

Apps

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

POST /app-automate/detox/v2/android/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 -F option. Either file or url parameter 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 file or url parameter 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",
  "shareable_id": "user-name/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 are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

  • shareable_id String

    Shareable ID allows other users in your organization to test an app you uploaded .
    Example: user-name/SampleApp

  • 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”

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

Download Copy Check Circle