> ## Documentation Index
> Fetch the complete documentation index at: https://checklyhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List test sessions

> Retrieves test sessions for the selected account. Use the optional query parameters to filter by creation time, status, branch, user, provider, text, or error group.



## OpenAPI

````yaml get /v1/test-sessions
openapi: 3.0.0
info:
  title: Checkly Public API
  version: v1
  description: >-
    These are the docs for the newly released Checkly Public API. If you have
    any questions, please do not hesitate to get in touch with us.
servers:
  - url: https://api.checklyhq.com
security:
  - Bearer: []
tags: []
paths:
  /v1/test-sessions:
    get:
      tags:
        - Test sessions
      summary: List test sessions
      description: >-
        Retrieves test sessions for the selected account. Use the optional query
        parameters to filter by creation time, status, branch, user, provider,
        text, or error group.
      operationId: getV1Testsessions
      parameters:
        - schema:
            type: number
            description: >-
              Only include test sessions created at or after this Unix
              timestamp.
          required: false
          description: Only include test sessions created at or after this Unix timestamp.
          name: from
          in: query
        - schema:
            type: number
            description: Only include test sessions created before this Unix timestamp.
          required: false
          description: Only include test sessions created before this Unix timestamp.
          name: to
          in: query
        - schema:
            type: integer
            nullable: true
            maximum: 100
            default: 20
            description: Maximum number of test sessions to return.
          required: false
          description: Maximum number of test sessions to return.
          name: limit
          in: query
        - schema:
            type: array
            items:
              type: string
              enum:
                - RUNNING
                - FAILED
                - PASSED
                - CANCELLED
            default:
              - FAILED
              - PASSED
              - RUNNING
              - CANCELLED
            description: Filter by test session status.
          required: false
          description: Filter by test session status.
          name: statuses
          in: query
        - schema:
            type: array
            items:
              type: string
            default: []
            description: Filter by Git branch name.
          required: false
          description: Filter by Git branch name.
          name: branches
          in: query
        - schema:
            type: array
            items:
              type: string
            default: []
            description: Filter by commit owner or invoking user ID.
          required: false
          description: Filter by commit owner or invoking user ID.
          name: users
          in: query
        - schema:
            type: array
            items:
              type: string
              enum:
                - GITHUB
                - VERCEL
                - API
                - TRIGGER
                - PW_REPORTER
            default: []
            description: Filter by test session provider.
          required: false
          description: Filter by test session provider.
          name: providers
          in: query
        - schema:
            type: boolean
            default: false
            description: Include sessions with no commit owner and no invoking user.
          required: false
          description: Include sessions with no commit owner and no invoking user.
          name: noUsers
          in: query
        - schema:
            type: string
            minLength: 1
            description: Opaque cursor returned from a previous list response.
          required: false
          description: Opaque cursor returned from a previous list response.
          name: nextId
          in: query
        - schema:
            type: string
            minLength: 3
            maxLength: 200
            description: Search test session text fields.
          required: false
          description: Search test session text fields.
          name: textSearch
          in: query
        - schema:
            type: string
            nullable: true
            minLength: 1
            description: Filter by test-session error group ID.
          required: false
          description: Filter by test-session error group ID.
          name: errorGroupId
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Your Checkly account ID, you can find it at
              https://app.checklyhq.com/settings/account/general
          required: false
          description: >-
            Your Checkly account ID, you can find it at
            https://app.checklyhq.com/settings/account/general
          name: x-checkly-account
          in: header
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTestSessionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ListTestSessionsResponse:
      type: object
      properties:
        length:
          type: integer
          minimum: 0
        entries:
          type: array
          items:
            $ref: '#/components/schemas/TestSessionListEntry'
        nextId:
          type: string
          nullable: true
      required:
        - length
        - entries
    ApiError:
      type: object
      properties:
        statusCode:
          type: number
        error:
          type: string
        message:
          type: string
      required:
        - statusCode
        - error
        - message
    TestSessionListEntry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        accountId:
          type: string
          format: uuid
        projectId:
          type: string
          nullable: true
          format: uuid
        name:
          type: string
        provider:
          type: string
        running:
          type: array
          nullable: true
          items:
            type: string
            format: uuid
        passed:
          type: array
          nullable: true
          items:
            type: string
            format: uuid
        failed:
          type: array
          nullable: true
          items:
            type: string
            format: uuid
        cancelled:
          type: array
          items:
            type: string
            format: uuid
          default: []
        status:
          type: string
          enum:
            - RUNNING
            - FAILED
            - PASSED
            - CANCELLED
        region:
          type: string
        privateLocationId:
          type: string
          nullable: true
          format: uuid
        invoker:
          $ref: '#/components/schemas/TestSessionListEntryInvoker'
        repoUrl:
          type: string
          nullable: true
        commitId:
          type: string
          nullable: true
        commitOwner:
          type: string
          nullable: true
        commitMessage:
          type: string
          nullable: true
        branchName:
          type: string
          nullable: true
        environment:
          type: string
          nullable: true
        startedAt:
          type: string
          nullable: false
          format: date-time
        stoppedAt:
          type: string
          nullable: true
          format: date-time
        created_at:
          type: string
          nullable: false
          format: date-time
        updated_at:
          type: string
          nullable: true
          format: date-time
      required:
        - id
        - accountId
        - name
        - provider
        - region
        - startedAt
        - created_at
    TestSessionListEntryInvoker:
      type: object
      nullable: true
      properties:
        name:
          type: string
        picture:
          type: string
          nullable: true
      required:
        - name
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: Bearer
      description: >-
        The Checkly Public API uses API keys to authenticate requests. You can
        get the API Key
        [here](https://app.checklyhq.com/settings/user/api-keys). Your API key
        is like a password:  keep it secure!

        Authentication to the API is performed using the Bearer auth method in
        the Authorization header and using the account ID.

        For example, set **Authorization** header while using cURL: `curl -H
        "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"` 

````