---
title: "Retrieve a test session"
method: GET
path: "/v1/test-sessions/{testSessionId}"
tags: ["Test sessions"]
---

# Retrieve a test session

`GET /v1/test-sessions/{testSessionId}`

Retrieves a test session. Note that the returned data may be incomplete if the test session is still in progress.

## Path parameters

- `testSessionId` string, uuid, required — Test session ID.

## Headers

- `x-checkly-account` string, uuid — Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

## Response `200`

Successful

- FindOneTestSessionResponse
  - `testSessionId` string, uuid, required
  - `testSessionLink` string, uri, required
  - `name` string, required
  - `status` 'RUNNING' | 'FAILED' | 'PASSED' | 'CANCELLED', required
  - `errorGroupIds` string[], required — IDs of the test-session error groups observed in this test session.
  - `startedAt` string, date-time, required
  - `stoppedAt` string, date-time, nullable
  - `timeElapsed` number, required
  - `metadata` TestSessionMetadata
    - `environment` string — A short description for the testing environment.
    - `repoUrl` string, nullable
    - `commitId` string, nullable
    - `commitOwner` string, nullable
    - `commitMessage` string, nullable
    - `branchName` string, nullable
    - `github` TestSessionGitHubMetadata
      - `reporting` boolean, required
      - `repository` string, nullable
      - `sha` string, nullable
      - `runId` string, nullable
      - `runAttempt` string, nullable
      - `workflow` string, nullable
      - `job` string, nullable
      - `eventName` string, nullable
      - `ref` string, nullable
      - `headRef` string, nullable
      - `baseRef` string, nullable
      - `serverUrl` string, nullable
  - `results` TestSessionResult[]
    - `testSessionResultId` string, uuid, required
    - `testSessionResultLink` string, uri, required
    - `checkId` string, uuid, nullable
    - `checkType` 'AGENTIC' | 'API' | 'BROWSER' | 'HEARTBEAT' | 'ICMP' | 'MULTI_STEP' | 'TCP' | 'PLAYWRIGHT' | 'URL' | 'DNS' | 'SSL' | 'GRPC' | 'TRACEROUTE', required
    - `name` string
    - `runLocation` string
    - `errorGroupIds` string[], required — IDs of the test-session error groups associated with this result.
    - `resultType` 'FINAL' | 'ATTEMPT' | 'PENDING'
    - `status` 'RUNNING' | 'FAILED' | 'PASSED' | 'CANCELLED', required
    - `hasErrors` boolean, required
    - `hasFailures` boolean, required
    - `isDegraded` boolean, required
    - `aborted` boolean, required
    - `responseTime` number, nullable — Time the check spent producing its result, in milliseconds. For protocol checks this is the measured operation time (a subset of the run): request time for API and URL checks, connection time for TCP, resolution time for DNS, average latency for ICMP and TRACEROUTE, request timing for GRPC, and TLS handshake time for SSL. For browser, multi-step, Playwright and agentic checks it is the run wall-clock duration. Null until the check has finished. For the total wall-clock time a check run took, use `stoppedAt` - `startedAt`.
    - `startedAt` string, date-time, nullable — When the check run started. Null until the check has started.
    - `stoppedAt` string, date-time, nullable — When the check run finished. Subtract `startedAt` for the total wall-clock duration of the run. Null until the check has finished.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests

---

[API](https://skmtc.net/checklyhq/apis/checkly-public-api.md) · [All operations](https://skmtc.net/checklyhq/apis/checkly-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/checklyhq/checkly-public-api/versions/9e903da4f3da/schema)
