Skip to content

Get a test's history across runs

GET
/projects/{projectId}/tests/{testName}
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.

projectId
required
string

A project id from GET /projects.

testName
required
string

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=.

filePath
string

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.

days
integer
default: 30
Allowed values: 7 30 90

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.

OK

Media typeapplication/json
object
project
required
object
id
required
string
name
required
string
test
required
object
name
required
string
filePath
required
Any of:
string
window
required
object
days
required
integer
>= -9007199254740991 <= 9007199254740991
from
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
to
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
occurrences
required
Array<object>
object
runId
required
string
runNumber
required
integer
>= -9007199254740991 <= 9007199254740991
branch
required
Any of:
string
testedRevision
required
Any of:
string
startedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
status
required
string
durationMs
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
attempts
required
integer
>= -9007199254740991 <= 9007199254740991
wastedMs
required
integer
>= -9007199254740991 <= 9007199254740991
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
}
]
}
Squally-Key-Expires-At
string format: date-time

When the read key expires (ISO-8601). Present only from 7 days before expiry.

Error: ambiguous_test, invalid_period

Media typeapplication/json
object
error
required

A sentence for a human. May be reworded.

string
code
required

Stable slug - match on this, not on the sentence.

string
Allowed values: missing_key invalid_key wrong_key_type key_revoked key_expired tier_too_low project_not_found invalid_period rate_limited test_not_found ambiguous_test internal_error invalid_parameter run_not_found error_not_found
code
required
Allowed values: ambiguous_test invalid_period
Example
{
"code": "ambiguous_test"
}

Error: invalid_key, key_expired, key_revoked, missing_key, wrong_key_type

Media typeapplication/json
object
error
required

A sentence for a human. May be reworded.

string
code
required

Stable slug - match on this, not on the sentence.

string
Allowed values: missing_key invalid_key wrong_key_type key_revoked key_expired tier_too_low project_not_found invalid_period rate_limited test_not_found ambiguous_test internal_error invalid_parameter run_not_found error_not_found
code
required
Allowed values: invalid_key key_expired key_revoked missing_key wrong_key_type
Example
{
"code": "invalid_key"
}

Error: tier_too_low

Media typeapplication/json
object
error
required

A sentence for a human. May be reworded.

string
code
required

Stable slug - match on this, not on the sentence.

string
Allowed values: missing_key invalid_key wrong_key_type key_revoked key_expired tier_too_low project_not_found invalid_period rate_limited test_not_found ambiguous_test internal_error invalid_parameter run_not_found error_not_found
code
required
Allowed values: tier_too_low
Example
{
"code": "tier_too_low"
}

Error: project_not_found, test_not_found

Media typeapplication/json
object
error
required

A sentence for a human. May be reworded.

string
code
required

Stable slug - match on this, not on the sentence.

string
Allowed values: missing_key invalid_key wrong_key_type key_revoked key_expired tier_too_low project_not_found invalid_period rate_limited test_not_found ambiguous_test internal_error invalid_parameter run_not_found error_not_found
code
required
Allowed values: project_not_found test_not_found
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

Media typeapplication/json
object
error
required

A sentence for a human. May be reworded.

string
code
required

Stable slug - match on this, not on the sentence.

string
Allowed values: missing_key invalid_key wrong_key_type key_revoked key_expired tier_too_low project_not_found invalid_period rate_limited test_not_found ambiguous_test internal_error invalid_parameter run_not_found error_not_found
code
required
Allowed values: internal_error
Example
{
"code": "internal_error"
}