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 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.
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.
The run ID
run_abc123Add 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.
falseSuccessful response
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
Payload Too Large - Response size exceeds limits. Use Accept-Encoding: gzip header.
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 a run and all associated data
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.
The run ID
run_abc123Run deleted successfully
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
DELETE /v1/runs/{runId} HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"status": "OK",
"data": {
"runId": "text"
}
}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.
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.
The project ID
proj_abc123The CI build ID. If provided, returns the run with this exact ciBuildId.
Branch filter value: an exact branch name, or a trailing * for prefix match (e.g. release/*). Max 250 characters.
Exact branch name (must not contain * or spaces).
^[!-)+-~]+$Prefix match: branch prefix followed by *.
^[!-)+-~]+\*$Filter by tags (can be specified multiple times using bracket notation, e.g., tags[]=value1&tags[]=value2)
["tag1","tag2"]Deprecated. Use tags[] instead. Run tags to filter by (can be specified multiple times using bracket notation, e.g., tag[]=tag1&tag[]=tag2)
["tag1","tag2"]If true, includes information about failed tests from the last run (Playwright only)
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.
falseSuccessful response
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
Payload Too Large - Response size exceeds limits. Use Accept-Encoding: gzip header.
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 a run in progress
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.
The run ID
run_abc123Run cancelled successfully
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
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 failed spec files in a run to allow re-execution. Requires specifying machineId(s) to reset.
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.
The run ID
run_abc123Machine ID(s) to reset
Whether to use batched orchestration
Run reset successfully
Reset operation result
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
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": {}
}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.
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.
A spec file, instead of instanceId
Picks one instance when a spec ran in more than one group
The full title joined with " > ", or its last element, instead of testId
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.
The build ID of the run
Upload URLs, in the order of the request
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
The build matches more than one run, or the target is ambiguous (ambiguous_target, with candidates)
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"
}
}
]
}
}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.
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.
The run ID
run_abc123A link or a reason for each test, in the order of the request
Invalid request parameters
Authentication failed
Public context sharing is turned off for the organization (sharing_disabled)
Resource not found
Too many requests for the organization (rate_limited)
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"
}
]
}
}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.
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.
The run ID
run_abc123A spec file, instead of instanceId
Picks one instance when a spec ran in more than one group
The full title joined with " > ", or its last element, instead of testId
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.
Upload URLs, in the order of the request
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
The target is ambiguous (ambiguous_target, with candidates) or the spec file has not finished (instance_not_complete)
Too many requests for the organization (rate_limited)
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 a run by GitHub Actions workflow run ID and attempt number
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.
GitHub Actions workflow run ID
GitHub Actions workflow run attempt number
Optional project ID to scope the cancellation
Optional CI build ID to scope the cancellation
Run cancelled successfully
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Five refusals share the status: a read API key on an endpoint that writes, an OAuth token that was not granted the scope the endpoint needs (insufficient_scope), an OAuth token that was granted it but whose holder no longer has a role permitting it (insufficient_role), an OAuth token on an endpoint that accepts an API key and nothing else (api_key_required), and an API key on an endpoint that answers for a user (user_credential_required). Discriminate on code rather than on the message, which is free-form. The first refusal predates the codes and sets none. Only insufficient_scope carries the challenge header, because it is the only one a client can act on by re-authorizing.
Resource not found
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?