Skip to main content
Table of Contents

Project

Projects are organizational structures for builds. Use our REST API to access the project list, project details, update the project name, and delete a project.

Get project list

GET /automate/projects.json

Invoking this API will fetch you the list of projects associated with your username and access key. You will need the id of the project for invoking any other Project API that follows in this document.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/automate/projects.json

No parameter required.

Response Attributes 200 OK Array

Response

[
    {
        "id": 866256,
        "name": "pricing_project",
        "group_id": 2,
        "user_id": 256454,
        "created_at": "2020-02-13T12:18:08.000Z",
        "updated_at": "2020-09-03T07:13:15.000Z",
        "sub_group_id": 3
    },
    {
        "id": 874983,
        "name": "navigation_project",
        "group_id": 2,
        "user_id": 1344744,
        "created_at": "2020-03-11T10:14:36.000Z",
        "updated_at": "2020-09-18T09:45:57.000Z",
        "sub_group_id": 0
    },
    {...}
]
  • id Integer

    ID of your project.

  • name String

    Name of your project.

  • group_id Integer

    Identifier for your account or group.

  • user_id Integer

    Identifier for the user.

  • created_at String

    Time at which the project was created on BrowserStack servers.

  • updated_at String

    Time at which the project was updated on BrowserStack servers.

  • sub_group_id Integer

    Identifier for a team in a group.

Get project details

GET /automate/projects/{project_id}.json

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

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/automate/projects/<project-id>.json
  • id* number

    ID of the project.

Response Attributes 200 OK JSON

Response

{
    "project": {
        "id": 966019,
        "name": "pricing_project",
        "group_id": 2,
        "user_id": 3852199,
        "created_at": "2020-09-01T15:06:30.000Z",
        "updated_at": "2020-09-01T15:09:37.000Z",
        "sub_group_id": 0,
        "builds": [
            {
                "id": 41213076,
                "name": "pricing_project_build",
                "duration": 12,
                "status": "done",
                "tags": null,
                "group_id": 2,
                "user_id": 3852199,
                "automation_project_id": 966019,
                "created_at": "2020-09-01T15:09:37.000Z",
                "updated_at": "2020-09-01T15:09:49.000Z",
                "hashed_id": "4207442b2b0567368956dba064c22a3235a76214",
                "delta": true,
                "sub_group_id": 0,
                "framework": "selenium",
                "test_data": {}
            }
            {...}
        ]
    }
}
  • id Integer

    ID of your project.

  • name String

    Name of your project.

  • group_id Integer

    Identifier for your account or group.

  • user_id Integer

    Identifier for the user.

  • created_at String

    Time at which the project was created on BrowserStack servers.

  • updated_at String

    Time at which the project was updated on BrowserStack servers.

  • sub_group_id Integer

    Identifier for a team in a group.

  • builds Array

    Details of the build.

    SHOW VALUES
    • id Integer

      ID of the build.

    • name String

      Name of the build.

    • duration Integer

      Duration of build execution.

    • status String

      Status of the build.

    • group_id Integer

      An identifier for your account or group.

    • user_id Integer

      An identifier for the user.

    • automation_project_id Integer

      ID of the project.

    • created_at String

      Time at which the build was created on BrowserStack servers.

    • updated_at String

      Time at which the build was updated on BrowserStack servers.

    • hashed_id String

      ID of the build.

    • sub_group_id Integer

      An identifier for a team in a group.

Get status badge

GET /automate/projects/{project-id}/badge_key

You can embed a status badge in READMEs or other web documents. The status badge for a project shows the status of the latest build in that project. Using the badge key, you can also share a public link for the Automate dashboard to view the latest build and sessions for that project.

For example:
BrowserStackBrowserStackcompletedcompleted

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/automate/projects/<project-id>/badge_key
  • id* String

    ID of the Project.

Response Attributes 200 OK Text

Response

VnZ6dGxkRGxGc1RIY01iZGZBVjJBNTA2R0s4ZUhiZkg2cnBJSUdWd0xZcz0tLW90d2dTMDRkVW12WVgxN2lJbTN0Y2c9PQ==--d1e0550cd79408089b252faa4a5204b7dc5c2881
  • badge key String

    Badge key.

Note: Learn more about how to use the generated Badge key to actually generate a Status badge for your project

Update project details

PUT /automate/projects/{project_id}.json

You can update the name of your project after the project 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\":\"<project-name>\"}" \
https://api.browserstack.com/automate/projects/<project-id>.json
  • id* String

    ID of the project.

  • name* String

    Updated name of the project.

Response Attributes 200 OK JSON

Response

{
    "id":966019,
    "name":"pricing_project",
    "group_id":2,
    "user_id":3852199,
    "created_at":"2020-09-01T15:06:30.000Z",
    "updated_at":"2020-09-02T12:20:03.442Z",
    "sub_group_id":0
}
  • id Integer

    ID of your project.

  • name String

    Updated name of your project.

  • group_id Integer

    Identifier for your account or group.

  • user_id Integer

    Identifier for the user.

  • created_at String

    Time at which the project was created on BrowserStack servers.

  • updated_at String

    Time at which the project was updated on BrowserStack servers.

  • sub_group_id Integer

    Identifier for a team in a group.

Delete project

DELETE /automate/projects/{project_id}.json

You can delete a project on the server using the DELETE method. Please note that to delete a project, it needs to be empty of builds and sessions, and projects once deleted cannot be recovered.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE https://api.browserstack.com/automate/projects/<project-id>.json
  • id* String

    ID of the project.

Response Attributes 200 OK JSON

Response

{
    "status":"ok",
    "message":"Project 966019 was deleted successfully."
}
  • status String

    Status of deletion.

  • message String

    Project 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