Skip to main content
No Result Found

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",
            "crash_logs_url": "https://api.browserstack.com/app-automate/builds/g0726012b6rb0a4c79122d6048c7b8767677ad61/sessions/22dbfb187486090d974a11ac91t65722988e0705/crashlogs",
            "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.

      • crash_logs_url String

        URL to fetch crash 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. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

        • 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. Note that deleting a build also deletes all the test sessions contained within it and builds once deleted cannot be recovered.

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.

Post terminal logs

POST /app-automate/builds/{build_id}/terminallogs

Upload terminal logs for your build using the POST method.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-L -X POST 'https://api-cloud.browserstack.com/app-automate/builds/<build_id>/terminallogs' \
-F 'file=@"/path/file.log"'
  • build_id* String

    ID of the test build available on the App Automate dashboard.

  • file* Path

    Path to the terminal log file on your machine. The max allowed file size is 2MB.

Response Attributes 200 OK JSON

Response

{
    "status": "success",
    "message": "File has been uploaded successfully!"
}
  • build_id* String

    ID of the test build available on the App Automate dashboard.

  • file* Path

    Path to the terminal log file on your machine. The max allowed file size is 2MB.

Update build tags

PUT /app-automate/builds/{build_id}.json

You can update the build tags after the build completes using the PUT method.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PUT -H "Content-Type: application/json" \
-d "{\"build_tag\":\"<your-build-tag>\"}" https://api.browserstack.com/app-automate/builds/<build-id>.json
  • id* String

    ID of the build.

  • tag* String

    The new build tag that you want to set.

Response Attributes 200 OK application/json

Response

{
    "name":"Appium logs enabled",
    "duration":141,
    "status":"done",
    "hashed_id":"e8cde62c7e261edb013e82ac0096a650b4694b84",
    "build_tag":"reg"
}
  • name String

    Name of your build.

  • duration Integer

    Duration of build execution.

  • status String

    Status of the build.

  • hashed_id String

    ID of the build as passed in the request.

  • tag String

    Updated tag of your build.

Note: You can add, edit, or delete the build tags using this API endpoint. To delete a build tag, simply pass an empty string. If you pass an empty string, the tagging will be removed.

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