Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Runs

Query and manage test runs.

A run represents a single execution of your test suite. Runs contain spec files which are executed across multiple instances. You can query run details, cancel runs, reset failed specs, and delete runs.

Per-test outcome counters on specs (results.stats) use the RecordedTestOutcome vocabulary—see components/schemas for how pending and skipped differ from failures.

Get run

get
/runs/{runId}

Get a single run by ID with full details. Runs with many test files can produce a large JSON response. Include Accept-Encoding: gzip in your request when possible. Spec results.stats exposes pending, skipped, and failures separately; see RecordedTestOutcome in components/schemas and compare to Tests Explorer metrics mapping. For narrative context, see the Test result statuses documentation page.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
runIdstringRequired

The run ID

Example: run_abc123
Query parameters
include_attachmentsbooleanOptional

Add attachments: every file of the run, at every level, with signed URLs. On a large run the list is several megabytes; send Accept-Encoding: gzip.

Default: false
Responses
200

Successful response

application/json
statusstring · enumRequiredPossible values:
get/runs/{runId}
GET /v1/runs/{runId} HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "data": {
    "runId": "text",
    "projectId": "text",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "durationMs": 1,
    "deletedAt": "2026-01-01T00:00:00.000Z",
    "tags": [
      "text"
    ],
    "previousRunId": "text",
    "isSession": true,
    "attachmentCounts": {
      "total": 1,
      "byLevel": {
        "run": 1,
        "instance": 1,
        "test": 1,
        "attempt": 1
      },
      "byType": {
        "screenshot": 1,
        "video": 1,
        "trace": 1,
        "attachment": 1
      },
      "bySource": {
        "reporter": 1,
        "api": 1
      }
    },
    "attachments": [
      {
        "attachmentId": "text",
        "level": "run",
        "source": "reporter",
        "machineId": "text",
        "instanceId": "text",
        "spec": "text",
        "groupId": "text",
        "testId": "text",
        "testTitle": [
          "text"
        ],
        "attempt": 1,
        "name": "text",
        "type": "trace",
        "contentType": "text",
        "sizeBytes": 1,
        "caption": "text",
        "meta": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "createdAt": "2026-01-01T00:00:00.000Z",
        "readUrl": "text"
      }
    ],
    "timeout": {
      "isTimeout": true,
      "timeoutValueMs": 1
    },
    "cancellation": {
      "cancelledAt": "2026-01-01T00:00:00.000Z",
      "cancelledBy": "text",
      "reason": "text"
    },
    "groups": [
      {
        "groupId": "text",
        "platform": {
          "osName": "text",
          "osVersion": "text",
          "browserName": "text",
          "browserVersion": "text"
        },
        "tags": [
          "text"
        ],
        "environment": "text",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "coverageEnabled": true,
        "durationMs": 1,
        "specCount": 1,
        "instances": {
          "overall": 1,
          "claimed": 1,
          "complete": 1,
          "passes": 1,
          "failures": 1
        },
        "tests": {
          "total": 1,
          "recorded": 1,
          "passes": 1,
          "failures": 1,
          "pending": 1,
          "retries": 1,
          "skipped": 1,
          "flaky": 1
        }
      }
    ],
    "meta": {
      "ciBuildId": "text",
      "pr": {
        "id": "text",
        "link": "text",
        "title": "text",
        "source": "text",
        "destination": "text"
      },
      "commit": {
        "sha": "text",
        "branch": "text",
        "authorName": "text",
        "authorEmail": "text",
        "message": "text",
        "remoteOrigin": "text"
      },
      "framework": {
        "name": "text",
        "version": "text"
      }
    },
    "specs": [
      {
        "spec": "text",
        "groupId": "text",
        "instanceId": "text",
        "claimedAt": "2026-01-01T00:00:00.000Z",
        "completedAt": "2026-01-01T00:00:00.000Z",
        "machineId": "text",
        "tags": [
          "text"
        ],
        "inactivityTimeoutMs": 1,
        "results": {
          "stats": {
            "suites": 1,
            "tests": 1,
            "passes": 1,
            "failures": 1,
            "pending": 1,
            "skipped": 1,
            "flaky": 1,
            "wallClockStartedAt": "2026-01-01T00:00:00.000Z",
            "wallClockEndedAt": "2026-01-01T00:00:00.000Z",
            "wallClockDuration": 1,
            "startedAt": "2026-01-01T00:00:00.000Z",
            "endedAt": "2026-01-01T00:00:00.000Z",
            "duration": 1
          },
          "exception": "text",
          "flaky": 1,
          "videoUrl": "text",
          "screenshots": [
            {
              "screenshotId": "text",
              "name": "text",
              "testId": "text",
              "testAttemptIndex": 1,
              "takenAt": "2026-01-01T00:00:00.000Z",
              "screenshotURL": "text"
            }
          ]
        }
      }
    ],
    "completionState": "COMPLETE",
    "status": "PASSED"
  }
}

Delete run

delete
/runs/{runId}

Delete a run and all associated data

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
runIdstringRequired

The run ID

Example: run_abc123
Responses
200

Run deleted successfully

application/json
statusstring · enumRequiredPossible values:
delete/runs/{runId}
DELETE /v1/runs/{runId} HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "data": {
    "runId": "text"
  }
}

Find run

get
/runs/find

Find a run by query parameters. Returns the most recent completed run matching the criteria. For runs with many test files, the response can be large. There is a 1MB response limit. It is strongly recommended to include Accept-Encoding: gzip header in your request to enable compression.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Query parameters
projectIdstringRequired

The project ID

Example: proj_abc123
ciBuildIdstringOptional

The CI build ID. If provided, returns the run with this exact ciBuildId.

branchone ofOptional

Branch filter value: an exact branch name, or a trailing * for prefix match (e.g. release/*). Max 250 characters.

string · max: 250Optional

Exact branch name (must not contain * or spaces).

Pattern: ^[!-)+-~]+$
or
string · max: 250Optional

Prefix match: branch prefix followed by *.

Pattern: ^[!-)+-~]+\*$
tags[]string[]Optional

Filter by tags (can be specified multiple times using bracket notation, e.g., tags[]=value1&tags[]=value2)

Example: ["tag1","tag2"]
tag[]string[]OptionalDeprecated

Deprecated. Use tags[] instead. Run tags to filter by (can be specified multiple times using bracket notation, e.g., tag[]=tag1&tag[]=tag2)

Example: ["tag1","tag2"]
pwLastRunbooleanOptional

If true, includes information about failed tests from the last run (Playwright only)

include_attachmentsbooleanOptional

Add attachments: every file of the run, at every level, with signed URLs. On a large run the list is several megabytes; send Accept-Encoding: gzip.

Default: false
Responses
200

Successful response

application/json
statusstring · enumRequiredPossible values:
get/runs/find
GET /v1/runs/find?projectId=text HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "data": {
    "runId": "text",
    "projectId": "text",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "durationMs": 1,
    "deletedAt": "2026-01-01T00:00:00.000Z",
    "tags": [
      "text"
    ],
    "previousRunId": "text",
    "isSession": true,
    "attachmentCounts": {
      "total": 1,
      "byLevel": {
        "run": 1,
        "instance": 1,
        "test": 1,
        "attempt": 1
      },
      "byType": {
        "screenshot": 1,
        "video": 1,
        "trace": 1,
        "attachment": 1
      },
      "bySource": {
        "reporter": 1,
        "api": 1
      }
    },
    "attachments": [
      {
        "attachmentId": "text",
        "level": "run",
        "source": "reporter",
        "machineId": "text",
        "instanceId": "text",
        "spec": "text",
        "groupId": "text",
        "testId": "text",
        "testTitle": [
          "text"
        ],
        "attempt": 1,
        "name": "text",
        "type": "trace",
        "contentType": "text",
        "sizeBytes": 1,
        "caption": "text",
        "meta": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "createdAt": "2026-01-01T00:00:00.000Z",
        "readUrl": "text"
      }
    ],
    "timeout": {
      "isTimeout": true,
      "timeoutValueMs": 1
    },
    "cancellation": {
      "cancelledAt": "2026-01-01T00:00:00.000Z",
      "cancelledBy": "text",
      "reason": "text"
    },
    "groups": [
      {
        "groupId": "text",
        "platform": {
          "osName": "text",
          "osVersion": "text",
          "browserName": "text",
          "browserVersion": "text"
        },
        "tags": [
          "text"
        ],
        "environment": "text",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "coverageEnabled": true,
        "durationMs": 1,
        "specCount": 1,
        "instances": {
          "overall": 1,
          "claimed": 1,
          "complete": 1,
          "passes": 1,
          "failures": 1
        },
        "tests": {
          "total": 1,
          "recorded": 1,
          "passes": 1,
          "failures": 1,
          "pending": 1,
          "retries": 1,
          "skipped": 1,
          "flaky": 1
        }
      }
    ],
    "meta": {
      "ciBuildId": "text",
      "pr": {
        "id": "text",
        "link": "text",
        "title": "text",
        "source": "text",
        "destination": "text"
      },
      "commit": {
        "sha": "text",
        "branch": "text",
        "authorName": "text",
        "authorEmail": "text",
        "message": "text",
        "remoteOrigin": "text"
      },
      "framework": {
        "name": "text",
        "version": "text"
      }
    },
    "specs": [
      {
        "spec": "text",
        "groupId": "text",
        "instanceId": "text",
        "claimedAt": "2026-01-01T00:00:00.000Z",
        "completedAt": "2026-01-01T00:00:00.000Z",
        "machineId": "text",
        "tags": [
          "text"
        ],
        "inactivityTimeoutMs": 1,
        "results": {
          "stats": {
            "suites": 1,
            "tests": 1,
            "passes": 1,
            "failures": 1,
            "pending": 1,
            "skipped": 1,
            "flaky": 1,
            "wallClockStartedAt": "2026-01-01T00:00:00.000Z",
            "wallClockEndedAt": "2026-01-01T00:00:00.000Z",
            "wallClockDuration": 1,
            "startedAt": "2026-01-01T00:00:00.000Z",
            "endedAt": "2026-01-01T00:00:00.000Z",
            "duration": 1
          },
          "exception": "text",
          "flaky": 1,
          "videoUrl": "text",
          "screenshots": [
            {
              "screenshotId": "text",
              "name": "text",
              "testId": "text",
              "testAttemptIndex": 1,
              "takenAt": "2026-01-01T00:00:00.000Z",
              "screenshotURL": "text"
            }
          ]
        }
      }
    ],
    "completionState": "COMPLETE",
    "status": "PASSED"
  }
}

Cancel run

put
/runs/{runId}/cancel

Cancel a run in progress

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
runIdstringRequired

The run ID

Example: run_abc123
Responses
200

Run cancelled successfully

application/json
statusstring · enumRequiredPossible values:
put/runs/{runId}/cancel
PUT /v1/runs/{runId}/cancel HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "data": {
    "runId": "text",
    "cancelled": true,
    "cancelledAt": "2026-01-01T00:00:00.000Z"
  }
}

Reset run

put
/runs/{runId}/reset

Reset failed spec files in a run to allow re-execution. Requires specifying machineId(s) to reset.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
runIdstringRequired

The run ID

Example: run_abc123
Body
machineIdstring[] · min: 1 · max: 63Required

Machine ID(s) to reset

isBatchedOr8nbooleanOptional

Whether to use batched orchestration

Responses
200

Run reset successfully

application/json
statusstring · enumRequiredPossible values:
dataobjectRequired

Reset operation result

put/runs/{runId}/reset
PUT /v1/runs/{runId}/reset HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "machineId": [
    "text"
  ],
  "isBatchedOr8n": true
}
{
  "status": "OK",
  "data": {}
}

Add attachments to the run of a CI build

post
/runs/attachments

Like adding attachments to a run by ID, for a CI job that does not know the run ID: the run is found by projectId and ciBuildId, or by the CI variables in ci. Accepts a record key in the x-currents-key header as well as a bearer token.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Body
instanceIdstringOptional
specstringOptional

A spec file, instead of instanceId

groupIdstringOptional

Picks one instance when a spec ran in more than one group

testIdstringOptional
testTitlestringOptional

The full title joined with " > ", or its last element, instead of testId

attemptintegerOptional
machineIdstringOptional

Optional. A machine id identifies one reporter process: one CI job, or one shard of one. Send the id the reporter sent, which is CURRENTS_MACHINE_ID where you set it. With no spec file or test named, the run-level attachments are stored with this machine. With a spec file named, it chooses between instances of that spec that ran on different machines when the rest of the target matches more than one; otherwise it is ignored.

projectIdstringRequired
ciBuildIdstringOptional

The build ID of the run

Responses
200

Upload URLs, in the order of the request

application/json
statusstring · enumRequiredPossible values:
post/runs/attachments
POST /v1/runs/attachments HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 360

{
  "instanceId": "text",
  "spec": "text",
  "groupId": "text",
  "testId": "text",
  "testTitle": "text",
  "attempt": 1,
  "machineId": "text",
  "attachments": [
    {
      "name": "text",
      "type": "trace",
      "contentType": "image/png",
      "sizeBytes": 1,
      "caption": "text",
      "meta": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ],
  "projectId": "text",
  "ciBuildId": "text",
  "ci": {
    "provider": "text",
    "buildNumber": "text",
    "params": {}
  }
}
{
  "status": "OK",
  "data": {
    "runId": "text",
    "level": "run",
    "machineId": "text",
    "instanceId": "text",
    "testId": "text",
    "attempt": 1,
    "uploadExpiresInSeconds": 600,
    "attachments": [
      {
        "attachmentId": "text",
        "name": "text",
        "type": "text",
        "uploadUrl": "text",
        "uploadHeaders": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    ]
  }
}

Create a context link for each failed or flaky test of a run

post
/runs/{runId}/context-links

Creates a public link to the failure details of each failed or flaky test, for a coding agent reading the CI log. Meant for Currents reporters: recordId is the id the reporter protocol returns for each recorded test. Anyone who has a link can open it until its expiresAt, at most 1 day.

Authorizations
x-currents-keystringRequired

An organization's record key, the one a reporter sends. Accepted only by the two attachment routes under /runs, POST /runs/{runId}/context-links, POST /sessions, POST /sessions/{sessionId}/attachments and, for a session, POST /share, so a CI job can attach files, link its failed and flaky tests, record a session and share it with the key it already has.

Path parameters
runIdstringRequired

The run ID

Example: run_abc123
Body
Responses
200

A link or a reason for each test, in the order of the request

application/json
statusstring · enumOptionalPossible values:
post/runs/{runId}/context-links
POST /v1/runs/{runId}/context-links HTTP/1.1
Host: api.currents.dev
x-currents-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "tests": [
    {
      "instanceId": "text",
      "testId": "text",
      "recordId": "text"
    }
  ]
}
{
  "status": "OK",
  "data": {
    "runId": "text",
    "links": [
      {
        "url": "text"
      }
    ]
  }
}

Add attachments to a run

post
/runs/{runId}/attachments

Signs an upload URL for each attachment and records it on a spec file instance, a test or one attempt of a test of the run, or on the run itself. Upload each file with a PUT to its uploadUrl, sending the headers in uploadHeaders and a body of exactly sizeBytes bytes. Name the target by instanceId, testId and attempt, or by spec and testTitle; with no target, the attachments belong to the run itself, with the machineId sent if any. Besides a bearer token, this route accepts a record key in the x-currents-key header. Sessions have their own route, /sessions/{sessionId}/attachments.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
runIdstringRequired

The run ID

Example: run_abc123
Body
instanceIdstringOptional
specstringOptional

A spec file, instead of instanceId

groupIdstringOptional

Picks one instance when a spec ran in more than one group

testIdstringOptional
testTitlestringOptional

The full title joined with " > ", or its last element, instead of testId

attemptintegerOptional
machineIdstringOptional

Optional. A machine id identifies one reporter process: one CI job, or one shard of one. Send the id the reporter sent, which is CURRENTS_MACHINE_ID where you set it. With no spec file or test named, the run-level attachments are stored with this machine. With a spec file named, it chooses between instances of that spec that ran on different machines when the rest of the target matches more than one; otherwise it is ignored.

Responses
200

Upload URLs, in the order of the request

application/json
statusstring · enumRequiredPossible values:
post/runs/{runId}/attachments
POST /v1/runs/{runId}/attachments HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 264

{
  "instanceId": "text",
  "spec": "text",
  "groupId": "text",
  "testId": "text",
  "testTitle": "text",
  "attempt": 1,
  "machineId": "text",
  "attachments": [
    {
      "name": "text",
      "type": "trace",
      "contentType": "image/png",
      "sizeBytes": 1,
      "caption": "text",
      "meta": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ]
}
{
  "status": "OK",
  "data": {
    "runId": "text",
    "level": "run",
    "machineId": "text",
    "instanceId": "text",
    "testId": "text",
    "attempt": 1,
    "uploadExpiresInSeconds": 600,
    "attachments": [
      {
        "attachmentId": "text",
        "name": "text",
        "type": "text",
        "uploadUrl": "text",
        "uploadHeaders": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    ]
  }
}

Cancel run by GitHub CI

put
/runs/cancel-ci/github

Cancel a run by GitHub Actions workflow run ID and attempt number

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Body
githubRunIdstringRequired

GitHub Actions workflow run ID

githubRunAttemptintegerRequired

GitHub Actions workflow run attempt number

projectIdstringOptional

Optional project ID to scope the cancellation

ciBuildIdstringOptional

Optional CI build ID to scope the cancellation

Responses
200

Run cancelled successfully

application/json
statusstring · enumRequiredPossible values:
put/runs/cancel-ci/github
PUT /v1/runs/cancel-ci/github HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 81

{
  "githubRunId": "text",
  "githubRunAttempt": 1,
  "projectId": "text",
  "ciBuildId": "text"
}
{
  "status": "OK",
  "data": {
    "runId": "text",
    "cancelled": true,
    "cancelledAt": "2026-01-01T00:00:00.000Z"
  }
}

Last updated

Was this helpful?