Table of Contents
APP AUTOMATE API

Builds

Each build represents a logical grouping of test sessions executed on BrowserStack. They help you organize your test sessions on BrowserStack. Use our REST API to manage your builds and fetch build details in real-time.

List recent builds

GET /app-automate/builds.json

Retrieve a list of recent builds for your BrowserStack group.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/builds.json"

# Limit the number of projects to be displayed using "limit" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/builds.json?limit=5"

# Filter projects using "status" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/builds.json?status=running"
  • limit String

    Specify the number of builds to fetch. The default value is 10, and the maximum permitted value is 100.

  • offset String

    Retrieve a list of builds from a particular point using the offset parameter. Use offset in conjunction with limit parameter.

  • status String

    Filter recent builds based on the build status. The possible values are running, done, timeout, and failed.

Response Attributes 200 OK application/json

Response

[
    {
        "automation_build": {
            "name": "SampleBuild",
            "duration": 283,
            "status": "done",
            "hashed_id": "g0726012b6rb0a4c79122d6048c7b8767677ad61"
        }
    },
    {...}
]
  • Array

    List of recent builds

    SHOW VALUES
    • automation_build Object

      Details about a build

      SHOW VALUES
      • name String

        Name of your build.

      • duration String

        Total duration of your build execution.

      • status String

        Status of the build. The possible values for build status are :

        Key Value
        running Build is currently running.
        done All test sessions have executed.
        timeout Build timed out as one or more test sessions were idle for 90 seconds.
        failed One or more test sessions encountered errors.
      • hashed_id String

        Unique identifier for your build.

Get build details

GET /app-automate/builds/{buildID}/sessions.json

Get build details, including a list of test sessions executed under the given build.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions.json"
  • buildID* String

    Unique identifier for your build.

Response Attributes 200 OK application/json

Response

[
    {
        "automation_session": {
            "name": "login_test",
            "duration": 57,
            "os": "android",
            "os_version": "9.0",
            "browser_version": "app",
            "browser": null,
            "device": "OnePlus 6T",
            "status": "done",
            "hashed_id": "22dbfb187486090d974a11ac91t65722988e0705",
            "reason": "CLIENT_STOPPED_SESSION",
            "build_name": "SampleBuild",
            "project_name": "SampleProject",
            "logs": "https://app-automate.browserstack.com/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions/22dbfb187486090d974a11ac91t65722988e0705/logs",
            "browser_url": "https://app-automate.browserstack.com/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions/22dbfb187486090d974a11ac91t65722988e0705",
            "public_url": "https://app-automate.browserstack.com/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions/22dbfb187486090d974a11ac91t65722988e0705?auth_token=...",
            "appium_logs_url": "https://api.browserstack.com/app-automate/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions/22dbfb187486090d974a11ac91t65722988e0705/appiumlogs",
            "video_url": "https://app-automate.browserstack.com/sessions/22dbfb187486090d974a11ac91t65722988e0705/video?token=...&source=rest_api&diff=12802.675398402",
            "device_logs_url": "https://api.browserstack.com/app-automate/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions/22dbfb187486090d974a11ac91t65722988e0705/devicelogs",
            "app_details": {
                "app_url": "bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3",
                "app_name": "com.sample.loginapplication",
                "app_version": "1.0",
                "app_custom_id": "SampleApp",
                "uploaded_at": "2020-09-09T18:14:20.000Z"
            }
        }
    },
    {...}
]
  • Array

    List of all test sessions in the build.

    SHOW VALUES
    • automation_session Object

      Details about a test session

      SHOW VALUES
      • name String

        Name of your test session.

      • duration String

        Total duration of test session.

      • os String

        OS on which your session was executed. Possible values are android and ios

      • os_version String

        OS version on which your session was executed.

      • browser_version String

        The value will always be equal to app for App Automate test sessions.

      • device String

        Name of the device on which session was executed.
        Example Google Pixel 3

      • status String

        Status of the session. The possible values for session status are :

        Key Value
        running Test session is currently running.
        done The test session completed. This happens when your test script issues a driver.quit Appium command to BrowserStack to terminate a running session.
        timeout The test session was idle for 90 seconds. If no additional Appium commands are recevied for 90 seconds, the test session is terminated, and the session status is updated to Timed out.
        failed The test session encountered an error.
      • reason String

        Reason for session termination. For e.g., its set to CLIENT_STOPPED_SESSION when a session is terminated upon execution of driver.quit command.

      • build_name String

        Name of the build. If a build name was not set, the default value is Untitled Project

      • project_name String

        Name of the project. If a project name was not set, the default value is Untitled Build

      • logs String

        URL to fetch text logs for your test session.

      • public_url String

        Publicly accessible URL to share the report of this test session with anyone outside your team.

      • appium_logs_url String

        URL to fetch Appium logs for your test session.

      • video_url String

        URL to fetch video recording for your test session.

      • device_logs_url String

        URL to fetch device logs for your test session.

      • app_details Object

        Details about application under test for your test session.

        SHOW VALUES
        • app_url String

          The app_url of your uploaded app on BrowserStack.

        • app_name String

          Package name of the app.

        • app_version String

          Version of the app.

        • app_custom_id String

          Custom ID defined for the uploaded app.
          Example: SampleApp.

        • uploaded_at String

          Timestamp at which app was uploaded on BrowserStack.

Delete a build

DELETE /app-automate/builds/{buildID}.json

Delete a build previously started on BrowserStack. Please note that deleting a build will also delete all the test sessions contained within it.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY"\
-X DELETE "https://api-cloud.browserstack.com/app-automate/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61.json"
  • buildID* String

    Unique identifier for the build to be deleted.

Response Attributes 200 OK application/json

Response

{
    "status": "ok",
    "message": "Build g0726012b6rb0a4c79122d6048c7b8767677ad61 was deleted successfully."
}
  • status String

    Status of your delete request.

  • message String

    Confirmation message for successful deletion of the project.

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