BrowserStack Sessions API

Operations on Automate sessions.

Business capability
Software Quality Engineering BC-4200.50

Operations 7

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /automate/builds/{buildId}/sessions.json List the test sessions in a build · List sessions in a build #
Ask an LLM
“How do I see all the test sessions that ran in one build?”
“Which sessions in a build passed and which failed?”
Tell an agent
List the sessions in build {buildId}.
Show every test session that ran under build {buildId}.
GET /automate/sessions/{sessionId}.json Get details of one test session · Get session details #
Ask an LLM
“How do I look up a single Automate session's details and status?”
“What browser, OS and result did a specific test session run with?”
Tell an agent
Get the details of session {sessionId}.
Show me the status and browser of test session {sessionId}.
PUT /automate/sessions/{sessionId}.json Mark a session passed or failed · Update session status / metadata #
Ask an LLM
“How do I mark a BrowserStack session as passed or failed from my test script?”
“Can I record a reason when I flag a test session as failed?”
Tell an agent
Mark session {sessionId} as {status} with reason {reason}.
Rename session {sessionId} to {name}.
DELETE /automate/sessions/{sessionId}.json Delete a test session · Delete session #
Ask an LLM
“How do I delete a single test session and its recordings?”
“Can I remove one session without deleting the whole build?”
Tell an agent destructive · confirm first
Delete session {sessionId}.
Permanently remove test session {sessionId}.
GET /automate/sessions/{sessionId}/logs Download a session's Selenium logs · Download Selenium logs #
Ask an LLM
“Where can I get the Selenium command logs for a test run?”
“How do I download the raw Selenium log to debug a failing session?”
Tell an agent
Download the Selenium logs for session {sessionId}.
Fetch the Selenium command log of session {sessionId}.
GET /automate/sessions/{sessionId}/networklogs Download a session's network logs (HAR) · Download network logs (HAR) #
Ask an LLM
“How do I get the HAR file of network traffic from a test session?”
“Can I see which network requests failed during an automated test?”
Tell an agent
Download the network HAR log for session {sessionId}.
Get the captured network traffic of session {sessionId}.
GET /automate/sessions/{sessionId}/consolelogs Download a session's browser console logs · Download console logs #
Ask an LLM
“What JavaScript errors showed up in the browser console during my test?”
“How do I download the console logs from an Automate session?”
Tell an agent
Download the browser console logs for session {sessionId}.
Show the JavaScript console output from session {sessionId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/browserstack:browserstack-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

browserstack-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: BrowserStack Automate REST Sessions API
  description: 'Best-effort OpenAPI 3.1 description of the BrowserStack Automate REST API for managing

    plans, projects, builds, sessions, browsers, devices, access keys, and media used in

    Selenium-based cross-browser automated testing on BrowserStack.


    Authentication uses HTTP Basic with your BrowserStack username and access key.'
  version: '1.0'
  contact:
    name: BrowserStack
    url: https://www.browserstack.com/docs/automate/api-reference/selenium/introduction
  license:
    name: BrowserStack Terms of Service
    url: https://www.browserstack.com/terms
servers:
- url: https://api.browserstack.com
  description: BrowserStack Automate API base URL
security:
- basicAuth: []
tags:
- name: Sessions
  description: Operations on Automate sessions.
paths:
  /automate/builds/{buildId}/sessions.json:
    parameters:
    - name: buildId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Sessions
      summary: List sessions in a build
      operationId: listBuildSessions
      responses:
        '200':
          description: Array of sessions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Session'
  /automate/sessions/{sessionId}.json:
    parameters:
    - name: sessionId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Sessions
      summary: Get session details
      operationId: getSession
      responses:
        '200':
          description: Session details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
    put:
      tags:
      - Sessions
      summary: Update session status / metadata
      operationId: updateSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                  - passed
                  - failed
                reason:
                  type: string
                name:
                  type: string
      responses:
        '200':
          description: Updated session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
    delete:
      tags:
      - Sessions
      summary: Delete session
      operationId: deleteSession
      responses:
        '200':
          description: Session deletion confirmation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusMessage'
  /automate/sessions/{sessionId}/logs:
    parameters:
    - name: sessionId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Sessions
      summary: Download Selenium logs
      operationId: getSessionLogs
      responses:
        '200':
          description: Selenium log text
          content:
            text/plain:
              schema:
                type: string
  /automate/sessions/{sessionId}/networklogs:
    parameters:
    - name: sessionId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Sessions
      summary: Download network logs (HAR)
      operationId: getSessionNetworkLogs
      responses:
        '200':
          description: HAR file
          content:
            application/json:
              schema:
                type: object
  /automate/sessions/{sessionId}/consolelogs:
    parameters:
    - name: sessionId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Sessions
      summary: Download console logs
      operationId: getSessionConsoleLogs
      responses:
        '200':
          description: Console log text
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    Session:
      type: object
      properties:
        hashed_id:
          type: string
        name:
          type: string
        duration:
          type: integer
        os:
          type: string
        os_version:
          type: string
        browser_version:
          type: string
        browser:
          type: string
        device:
          type:
          - string
          - 'null'
        status:
          type: string
        reason:
          type:
          - string
          - 'null'
        build_name:
          type: string
        project_name:
          type: string
        logs:
          type: string
        browser_url:
          type: string
        public_url:
          type: string
        appium_logs_url:
          type: string
        video_url:
          type: string
        browser_console_logs_url:
          type: string
        har_logs_url:
          type: string
        selenium_logs_url:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    StatusMessage:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic auth using your BrowserStack username as username and your access key as password.