Skip to content

Get a test's attempts in a run, with the Copy-for-AI prompt

GET
/projects/{projectId}/runs/{runId}/tests/{testName}
curl --request GET \
--url https://app.squally.dev/api/v1/projects/example/runs/example/tests/example \
--header 'Authorization: Bearer <token>'

Every attempt of one test in one run, oldest first, each with its errors, code frame and a ready-made prompt for an assistant that has the repository open (null for an attempt without a real failure). Cheap.

projectId
required
string

A project id from GET /projects.

runId
required
string

A run id from GET /projects/{projectId}/runs - or any shard’s id of a sharded run.

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.

OK

Media typeapplication/json
object
project
required
object
id
required
string
name
required
string
run
required
object
id
required
string
runNumber
required
integer
>= -9007199254740991 <= 9007199254740991
branch
required
Any of:
string
test
required
object
name
required
string
filePath
required
Any of:
string
attempts
required
Array<object>
object
retry
required
integer
>= -9007199254740991 <= 9007199254740991
label
required
string
status
required
string
durationMs
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
browserName
required
Any of:
string
errors
required
Array<object>
object
message
required
Any of:
string
stack
required
Any of:
string
snippet
required
Any of:
string
location
required
Any of:
object
file
required
string
line
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
column
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
copyPrompt
required
Any of:
string
shard
required
Any of:
object
index
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
runId
required
string
Examplegenerated
{
"project": {
"id": "example",
"name": "example"
},
"run": {
"id": "example",
"runNumber": 1,
"branch": "example"
},
"test": {
"name": "example",
"filePath": "example"
},
"attempts": [
{
"retry": 1,
"label": "example",
"status": "example",
"durationMs": 1,
"browserName": "example",
"errors": [
{
"message": "example",
"stack": "example",
"snippet": "example",
"location": {
"file": "example",
"line": 1,
"column": 1
}
}
],
"copyPrompt": "example",
"shard": {
"index": 1,
"runId": "example"
}
}
]
}
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

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
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, run_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 run_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"
}