List and search tests
Lists tests, by default across every test collection in your organization — pass testCollectionId to narrow to one. Each row carries the id to pass to the per-test endpoints.
q searches name, file, class and parent as case-insensitive substrings. Several words are separate requirements, not a phrase — q=flaky slow returns tests matching both, in any position. It also accepts per-field qualifiers mixed freely with those words: q=file:checkout flaky class:PaymentTest. Qualifier keys are case-sensitive, and an unrecognized prefix is treated as literal text rather than guessed at.
Rows omit quarantineOverride, activeMonitors, firstSeenAt and lastFailureAt — fetch a single test for those.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the merge-queue permissions it holds; a key with none can read merge queues but change nothing. Those permissions scope merge queue only: every key can use the Flaky Tests and Dynamic CI endpoints, including their writes, whatever permissions it holds.
Query Parameters
Page size, between 1 and 100.
1 <= x <= 10025
Opaque cursor from a previous response's nextCursor. A cursor is bound to the operation and filter it was minted for.
"AQEKZm9vYmFy"
Set true to include total in the response. Costs an extra COUNT query, so it is off by default.
false
Narrow to one collection, by its id. Omitted searches every collection in your organization.
1"aB3xY9kQ"
Comma-separated statuses to include: healthy, flaky, broken.
1"flaky,broken"
Free-text search, with optional file: / class: / parent: / name: qualifiers.
1"file:checkout flaky"
Substring match on the test's file path.
1"src/payments"
Exact match on one of the test's code owners.
1"@acme/platform"
Exact match on the test's variant.
1"ubuntu-22.04"
Set to metrics to embed each test's metrics for period in the same response, instead of fetching them per test.
metrics "metrics"
Only tests carrying this label, by name. Matched exactly, including case, since two labels may differ only in case. An unknown name returns an empty page, not an error.
1"slow-on-prs"
Filter on effective quarantine state, derived from the test's status, its collection's quarantine settings and any per-test override.
quarantined, notQuarantined "quarantined"
Filter on whether the manual 'flag as flaky' mark is currently set.
true
Only tests that first became flaky inside period. Requires period.
true
Metrics window for include=metrics, any metric sort, and newlyFlaky. Required by each of them.
1d, 7d, 14d, 30d "7d"
Field to sort by. A metric sort requires period, and excludes tests with no comparable value in it — no runs at all for most metrics, and additionally no failure for lastFailureAt.
name, failureRate, durationP95, prsImpacted, lastRunAt, lastFailureAt Sort direction. Defaults per sort: ascending for name, descending for every metric sort, which order worst-first.
asc, desc Response
A page of tests
100Opaque cursor for the next page, or null on the last page. Pass it back verbatim as cursor; do not construct or inspect one.
"AQEKZm9vYmFy"
True when another page is available.
true
Total rows matching the filter. Present only when the request set includeTotal=true.
1247