Skip to main content
Table of Contents

Build

You can organize your test sessions on BrowserStack into builds. You can use this REST API to access the list of builds, update a specific build name, and delete a build.

Note: If you did not use the build capability in your tests, then your sessions would be put in an Untitled Build.
It is recommended that you organize your tests into builds and give them relevant names for you to be able to debug them properly using the Builds Dashboard

Get build list

GET /automate-turboscale/v1/builds

Fetch the 10 recent test builds that have run on BrowserStack using your username and access key. You can also limit the number of builds and paginate through your data.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/automate-turboscale/v1/builds

# Limit the number of builds to be displayed using "limit" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://api.browserstack.com/automate-turboscale/v1/builds?limit=5"

# View a subset of results using "status" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://api.browserstack.com/automate-turboscale/v1/builds?status=running"

# View specific builds results using "project_i_d" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://api.browserstack.com/automate-turboscale/v1/builds?project_id=1234"
  • limit String

    Specify the number of results to be displayed. The default value is 10, and the maximum value is 100.

  • offset String

    Retrieve builds from a specific point using the offset parameter.

  • status String

    The status parameter filters your results by the status of the build. The values accepted by this parameter are running, done, timeout, and failed.

  • project_id Integer

    Retrieve all builds related to the specified project ID.

Response Attributes 200 OK Array

Response

{
    "builds": [
        {
            "name": "pricing_project_build",
            "duration": 12,
            "status": "done",
            "build_tags": [],
            "build_priority": "low",
            "user_id": 3852199,
            "sub_group_id": 0,
            "group_id": 2,
            "hashed_id": "4207442b2b0567368956dba064c22a3235a76214",
            "created_at": "2020-09-01T15:09:37.000Z",
            "updated_at": "2020-09-01T15:09:49.000Z",            
            "framework": "selenium"
        },
        {...}
    ]
}
  • name String

    Name of your build.

  • hashed_id String

    ID of the build. (This hashed_id would be required for invoking the other endpoints in the Build API)

  • duration Integer

    Duration of build execution.

  • status String

    Status of the build (Either running, done, timeout, or failed).

  • framework String

    Test Framework used for your build.

  • build_priority String

    Priority used for your build.

  • build_tags Array

    List of tags used for your build.

  • user_id Integer

    ID of user triggering the build.

  • group_id Integer

    Account ID of user triggering the build.

  • sub_group_id Integer

    Team ID of user triggering the build.

  • created_at String

    Timestamp at which Build was triggered.

  • updated_at String

    Timestamp at which Build was last updated.

Get Build details

GET /automate-turboscale/v1/builds/{build_hashed_id}

Once the list of builds is available, more specific information about a particular project can be queried using the Build’s Hashed ID by invoking this API.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/automate-turboscale/v1/builds/<build-hashed-id>
  • id* number

    ID of the build.

Response Attributes 200 OK JSON

Response

{
  "name": "pricing_project_build",
  "duration": 12,
  "status": "done",
  "build_tags": [],
  "user_id": 3852199,
  "sub_group_id": 0,
  "group_id": 2,
  "hashed_id": "4207442b2b0567368956dba064c22a3235a76214",
  "created_at": "2020-09-01T15:09:37.000Z",
  "updated_at": "2020-09-01T15:09:49.000Z",            
  "framework": "selenium",
  "sessions": [
    {
      "name": "Performance Test",
      "duration": 46,
      "platform": "Linux",
      "browser": "chrome",
      "status": "passed",
      "hashed_id": "1dcee4ca7f0066b785f5a738ff7a4486e12090a0",
      "reason": "passed",
      "priority": "low",
      "tags": [],
      "created_at": "2020-09-01T15:09:37.000Z",
      "updated_at": "2020-09-01T15:09:49.000Z"
    },
    {...}
  ]
}
  • name String

    Name of your build.

  • hashed_id String

    ID of the build. (This hashed_id would be required for invoking the other endpoints in the Build API)

  • duration Integer

    Duration of build execution.

  • status String

    Status of the build (Either running, done, timeout, or failed).

  • framework String

    Test Framework used for your build.

  • build_priority String

    Priority used for your build.

  • build_tags Array

    List of tags used for your build.

  • user_id Integer

    ID of user triggering the build.

  • group_id Integer

    Account ID of user triggering the build.

  • sub_group_id Integer

    Team ID of user triggering the build.

  • created_at String

    Timestamp at which Build was triggered.

  • updated_at String

    Timestamp at which Build was last updated.

  • sessions Array

    List of sessions part of this build.

    SHOW VALUES
    • name String

      Name of the Session.

    • duration Integer

      Duration of Session execution.

    • status String

      Status of the session.

    • reason String

      Reason for session status.

    • created_at String

      Time at which the session was created on BrowserStack servers.

    • updated_at String

      Time at which the session was updated on BrowserStack servers.

    • hashed_id String

      Unique Hashed ID of the session.

    • tags Array

      A list of Test Tags attached to a Session.

    • priority String

      Test Priority used for running the session.

Update build details

PATCH /automate-turboscale/v1/builds/{build_id}

You can update the name of your build after the build is complete using the PUT method.

Request Parameters

Request

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

    ID of the build.

  • name String

    The new build tag that you want to set.

  • build_tags Array

    The list of new build tags that you want to set.

Response Attributes 200 OK JSON

Response

{
  "name": "Build updated via API",
  "duration": 9672246,
  "status": "error",
  "build_tags": [
    "regression",
    "sanity"
  ],
  "build_priority": "medium",
  "user_id": 5037266,
  "group_id": 2,
  "hashed_id": "31439663992c90a866d728a1b9b6205c",
  "created_at": "2023-05-26T13:10:19.000Z",
  "updated_at": "2023-09-15T14:07:38.000Z",
  "framework": "selenium"
}
  • name String

    Name of your build.

  • hashed_id String

    ID of the build. (This hashed_id would be required for invoking the other endpoints in the Build API)

  • duration Integer

    Duration of build execution.

  • status String

    Status of the build (Either running, done, timeout, or failed).

  • framework String

    Test Framework used for your build.

  • build_priority String

    Priority used for your build.

  • build_tags Array

    List of tags used for your build.

  • user_id Integer

    ID of user triggering the build.

  • group_id Integer

    Account ID of user triggering the build.

  • sub_group_id Integer

    Team ID of user triggering the build.

  • created_at String

    Timestamp at which Build was triggered.

  • updated_at String

    Timestamp at which Build was last updated.

Delete build

DELETE /automate-turboscale/v1/builds/{build_id}

You can delete a build on the server using the DELETE method. Please note that deleting a build will delete all the sessions contained within it. Builds once deleted cannot be recovered.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE https://api.browserstack.com/automate-turboscale/v1/builds/<build-id>
  • id* String

    ID of the build.

Response Attributes 200 OK JSON

Response

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

    Status of deletion.

  • message String

    Build deletion message.

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