Get a test's history across runs
const url = 'https://app.squally.dev/api/v1/projects/example/tests/example?days=7';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.squally.dev/api/v1/projects/example/tests/example?days=7' \ --header 'Authorization: Bearer <token>'One test in every run of a period, newest first: final status, duration, attempts and time spent on retries. Moderate.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”A project id from GET /projects.
The full test name as Squally stores it (Playwright’s title path). URL-encode it, including “/” as %2F. A name used in several spec files needs ?filePath=.
Query Parameters
Section titled “Query Parameters”The spec file of the test, as stored (e.g. tests/checkout.spec.ts); an empty value means a test with no file. Needed only when the name exists in several files - the 400 ambiguous_test answer lists them.
The period, in days, ending now. Must not exceed the plan’s retention (Standard 60, Pro 90 days); a longer period is refused with 400 invalid_period rather than answered with less data.
Responses
Section titled “ Responses ”OK
object
object
object
Examplegenerated
{ "project": { "id": "example", "name": "example" }, "test": { "name": "example", "filePath": "example" }, "window": { "days": 1, "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z" }, "occurrences": [ { "runId": "example", "runNumber": 1, "branch": "example", "testedRevision": "example", "startedAt": "2026-04-15T12:00:00Z", "status": "example", "durationMs": 1, "attempts": 1, "wastedMs": 1 } ]}Headers
Section titled “Headers”When the read key expires (ISO-8601). Present only from 7 days before expiry.
Error: ambiguous_test, invalid_period
object
A sentence for a human. May be reworded.
Stable slug - match on this, not on the sentence.
Example
{ "code": "ambiguous_test"}Error: invalid_key, key_expired, key_revoked, missing_key, wrong_key_type
object
A sentence for a human. May be reworded.
Stable slug - match on this, not on the sentence.
Example
{ "code": "invalid_key"}Error: tier_too_low
object
A sentence for a human. May be reworded.
Stable slug - match on this, not on the sentence.
Example
{ "code": "tier_too_low"}Error: project_not_found, test_not_found
object
A sentence for a human. May be reworded.
Stable slug - match on this, not on the sentence.
Example
{ "code": "project_not_found"}Rate limited by the edge firewall. No JSON body and no Retry-After - back off for at least 60 s.
Error: internal_error
object
A sentence for a human. May be reworded.
Stable slug - match on this, not on the sentence.
Example
{ "code": "internal_error"}