List flaky and broken tests (expensive)
const url = 'https://app.squally.dev/api/v1/projects/example/flaky?status=flaky&sort=timeLost&page=1&perPage=10';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/flaky?status=flaky&sort=timeLost&page=1&perPage=10' \ --header 'Authorization: Bearer <token>'Flaky and broken tests as the flakiness engine judges them over its fixed 14-day window, ranked by time lost. THE EXPENSIVE ENDPOINT: it runs the engine live on every call - call it once per question, not in a loop, and use the test status route for a single test.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”A project id from GET /projects.
Query Parameters
Section titled “Query Parameters”Only tests with this verdict.
Ranking: time lost (default), flake rate, or impact on the stable branch.
Case-insensitive substring of the test name or its file.
1-based page number. A page past the end answers the last page.
Rows per page.
Responses
Section titled “ Responses ”OK
object
object
The engine’s fixed window in days. The flaky list takes no other period.
object
object
object
Examplegenerated
{ "project": { "id": "example", "name": "example" }, "windowDays": 1, "sort": "example", "page": { "page": 1, "perPage": 1, "total": 1, "pageCount": 1 }, "tests": [ { "testName": "example", "filePath": "example", "status": "example", "statusReason": "example", "alsoActive": [ "example" ], "timeLostMs": 1, "flakeScore": 1, "flipRate": 1, "failureRate": 1, "runsConsidered": 1, "failureStreak": 1, "lastSeenAt": "2026-04-15T12:00:00Z", "lastRun": { "runId": "example", "runNumber": 1, "status": "example", "startedAt": "2026-04-15T12:00:00Z" } } ], "gatheringDataCount": 1}Headers
Section titled “Headers”When the read key expires (ISO-8601). Present only from 7 days before expiry.
Error: invalid_parameter
object
A sentence for a human. May be reworded.
Stable slug - match on this, not on the sentence.
Example
{ "code": "invalid_parameter"}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
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"}