Skip to main content
No Result Found

Apps

In order to test your native and hybrid apps on BrowserStack using Espresso, you first need to upload your 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/espresso/v2/app

Upload the application under test (AUT) for Espresso testing. Both .apk and .aab files are supported. There are two ways to upload an app :

  1. Upload from filesystem : Use this option if the app resides on your local machine or CI/CD server.
  2. Upload using public URL : Use this option when the app is hosted on a remote server (e.g. S3 bucket) and its downloadable via a publicly accessible URL.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/app" \
-F "file=@/path/to/app/file/application-debug.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 will attempt to download the app from this location. Either file or url parameter is required.

  • custom_id String

    Custom ID for the app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.Refer to our custom ID documentation to know more.

Response attributes 200 application/json

Response

{
    "app_name": "app-debug.apk",
    "app_url": "bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3",
    "app_version": "1.2.0",
    "app_id": "c8ddcb5649a8280ca800075bfd8f151115bba6b3",
    "uploaded_at": "2020-05-05 14:52:54 UTC",
    "custom_id": "SampleApp",
    "shareable_id": "steve/SampleApp",
    "expiry" : "2020-06-05 14:52:54 UTC"
}
  • 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 Espresso 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 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: steve/SampleApp

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

List uploaded apps

GET /app-automate/espresso/v2/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/espresso/v2/apps"

# List recent apps using customID
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/espresso/v2/apps?custom_id=SampleApp"
  • 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
    group Show apps uploaded by any user within your BrowserStack group. This is the default behaviour.
    user Show apps uploaded by you
  • limit String

    Number of recent apps to fetch. The default value is 10.

Response attributes 200 application/json

Response

{
    "apps": [
        {
            "app_name": "app-debug.apk",
            "app_url": "bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3",
            "app_version": "1.2.0",
            "app_id": "c8ddcb5649a8280ca800075bfd8f151115bba6b3",
            "uploaded_at": "2020-05-05 14:52:54 UTC",
            "custom_id": "SampleApp",
            "shareable_id": "steve/SampleApp",
            "expiry" : "2020-06-05 14:52:54 UTC"
        },
        {...}
    ]
}
  • apps Array

    List of recently uploaded apps.

    SHOW VALUES
    • 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 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/SampleApp.

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

Get app details

GET /app-automate/espresso/v2/apps/{appId}

Get details of an uploaded app.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/espresso/v2/apps/c8ddcb5649a8280ca800075bfd8f151115bba6b3"
  • appId* String

    The app ID of the uploaded app

Response attributes 200 application/json

Response

{
    "app": {
        "app_name": "app-debug.apk",
        "app_url": "bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3",
        "app_version": "1.2.0",
        "app_id": "c8ddcb5649a8280ca800075bfd8f151115bba6b3",
        "uploaded_at": "2020-05-05 14:52:54 UTC",
        "custom_id": "SampleApp",
        "shareable_id": "steve/SampleApp",
        "expiry" : "2020-06-05 14:52:54 UTC"
    }
}
  • app Object

    Details of the uploaded app

    SHOW VALUES
    • 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 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/SampleApp.

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

Delete an app

DELETE /app-automate/espresso/v2/apps/{appId}

Delete an app that was previously uploaded to BrowserStack. Note that apps once deleted cannot be recovered.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE "https://api-cloud.browserstack.com/app-automate/espresso/v2/apps/c8ddcb5649a8280ca800075bfd8f151115bba6b3"
  • appId* String

    The app ID of the uploaded app

Response attributes 200 application/json

Response

{
    "success": {
        "message": "App with url bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3 was deleted."
    }
}
  • success Object

    This is returned when the app is successfully deleted from BrowserStack servers.

    SHOW VALUES
    • message String

      Confirmation message for app deletion.

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