Instances
Query spec file execution instances.
An instance represents a single spec file execution within a run. It contains detailed information about test results, duration, and machine that executed the spec file.
Get a single spec file execution instance by ID with full test results
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.
The instance ID
inst_abc123Successful response
Invalid request parameters
Authentication failed
The credential authenticated but is not permitted to use this endpoint. Four 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), and an OAuth token on an endpoint that accepts an API key and nothing else (api_key_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/instances/{instanceId} HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"status": "OK",
"data": {
"instanceId": "text",
"runId": "text",
"groupId": "text",
"spec": "text",
"machineId": "text",
"claimedAt": "2026-01-01T00:00:00.000Z",
"completedAt": "2026-01-01T00:00:00.000Z",
"results": {
"stats": {
"tests": 1,
"passes": 1,
"failures": 1,
"pending": 1,
"skipped": 1
},
"exception": "text",
"flaky": 1,
"tests": [
{
"testId": "text",
"title": [
"text"
],
"state": "passed",
"displayError": "text",
"attempts": [
{
"attemptId": "text",
"state": "text",
"wallClockStartedAt": "2026-01-01T00:00:00.000Z",
"wallClockDuration": 1,
"error": {
"message": "text",
"stack": "text"
}
}
]
}
]
}
}
}Last updated
Was this helpful?