Get a test
Returns one test by its globally unique id, with the labels, quarantine override and active monitors currently applied to it. Ids come from list responses; they are opaque and not derivable client-side.
A test in another organization is reported as 404, not 403, and so is a malformed id — a caller must not be able to probe which ids exist.
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.
Path Parameters
The test's globally unique id.
1"bfeebcf4-0000-8000-8000-000000000001"
Query Parameters
Set to metrics to embed this test's metrics for period.
metrics "metrics"
Metrics window. Required with include=metrics.
1d, 7d, 14d, 30d "7d"
Response
The test
The test's globally unique id. Stable across repos and collections, and safe to store.
"bfeebcf4-0000-8000-8000-000000000001"
The owning collection's id.
"aB3xY9kQ"
The repository the test was uploaded for. Resolve with GET /v2/repositories/{id}. Uploads made without a repository carry the nil UUID, which names no repository and does not resolve.
"7a2b3c4d-5e6f-4a1b-8c9d-0e1f2a3b4c5d"
"suite::test_case_name"
"Foo"
"FooSuite"
"src/foo.test.ts"
The build target that ran the test, when one was reported.
"//src:foo_test"
""
Groups the same test across variants, when it has any.
"5d4c3b2a-1f0e-4a1b-8c9d-0e1f2a3b4c5d"
1000A test's current composite status, reconciled across every active monitor.
healthy, flaky, broken "flaky"
When status last changed — how long the test has been in its current state. Null for a test no monitor has ever classified.
"2026-06-01T10:00:00.000Z"
Whether the test is currently quarantined, derived from its status, the collection's quarantine settings and any override.
quarantined, notQuarantined "notQuarantined"
100The override currently in effect on this test, or null if none is.
The monitors currently classifying this test.
100When the test was first ingested. Null for tests last seen before Trunk began recording this, which is not backfilled.
"2026-05-20T08:00:00.000Z"
The most recent failing run Trunk still holds metrics for. Null if the test has never failed within that window.
"2026-06-10T12:30:00.000Z"
Returned only when include=metrics is set. Null when the test had no runs in period.