Get a test case
Returns one test case 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 case 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 org-scoped API key, sent as Authorization: Bearer <key>. Existing v1 tokens work here unchanged. There is no enqueue-only or read/write scope: an org key authorized for merge-queue writes can invoke every merge-queue mutation, including changing merge-protection configuration and pausing, draining or deleting a queue.
Path Parameters
The test case'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 case
The test case'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. The nil UUID for uploads made without a repository.
"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"
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.