Skip to main content
POST
Clear a test's flaky mark

Authorizations

Authorization
string
header
required

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 permissions it holds. A key with none can read merge queues but change nothing in them. Permissions cover merge queues and test-result uploads, including the quarantine lookups a CI run makes before it uploads; any key can call the other Flaky Tests and Dynamic CI endpoints, including their writes.

Path Parameters

testId
string
required

The test's globally unique id.

Minimum string length: 1
Example:

"bfeebcf4-0000-8000-8000-000000000001"

Response

The test, after the reconcile

id
string
required

The test's globally unique id. Stable across repos and collections, and safe to store.

Example:

"bfeebcf4-0000-8000-8000-000000000001"

testCollectionId
string
required

The owning collection's id.

Example:

"aB3xY9kQ"

repositoryId
string
required

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.

Example:

"7a2b3c4d-5e6f-4a1b-8c9d-0e1f2a3b4c5d"

name
string
required
Example:

"suite::test_case_name"

parentName
string
required
Example:

"Foo"

className
string
required
Example:

"FooSuite"

file
string
required
Example:

"src/foo.test.ts"

target
string
required

The build target that ran the test, when one was reported.

Example:

"//src:foo_test"

variant
string
required
Example:

""

crossVariantId
string | null
required

Groups the same test across variants, when it has any.

Example:

"5d4c3b2a-1f0e-4a1b-8c9d-0e1f2a3b4c5d"

codeowners
string[]
required
Maximum array length: 1000
Example:
status
enum<string>
required

A test's current composite status, reconciled across every active monitor.

Available options:
healthy,
flaky,
broken
Example:

"flaky"

statusSince
string<date-time> | null
required

When status last changed — how long the test has been in its current state. Null for a test no monitor has ever classified.

Example:

"2026-06-01T10:00:00.000Z"

quarantineState
enum<string>
required

Whether the test is currently quarantined, derived from its status, the collection's quarantine settings and any override.

Available options:
quarantined,
notQuarantined
Example:

"notQuarantined"

quarantinedSince
string<date-time> | null
required

When the test's current quarantine began, as far as Trunk records it. Null exactly when quarantineState is notQuarantined. For a test quarantined by an alwaysQuarantine override, the time that override was set. For a test quarantined automatically, the later of statusSince and the last time an override on it was cleared. Changes to the collection's quarantine settings are not recorded per test, so this can be earlier than when quarantining was turned on for the collection.

Example:

"2026-06-01T10:00:00.000Z"

labels
object[]
required
Maximum array length: 100
url
string<uri>
required

The test's page in the Trunk web app.

Example:

"https://app.trunk.io/acme/flaky-tests/collections/aB3xY9kQ/tests/bfeebcf4-0000-8000-8000-000000000001"

ticket
object | null
required

The ticket currently linked to this test, as Trunk last synced it, or null if none is linked.

quarantineOverride
object | null
required

The override currently in effect on this test, or null if none is.

activeMonitors
object[]
required

The monitors currently classifying this test.

Maximum array length: 100
manualFlag
object | null
required

The test's flaky mark set by hand, or null if it has none. While it is set, activeMonitors also lists a manual entry. The mark is not a status override: a monitor classifying the test as broken still wins status.

firstSeenAt
string<date-time> | null
required

When the test was first ingested. Null for tests last seen before Trunk began recording this, which is not backfilled.

Example:

"2026-05-20T08:00:00.000Z"

lastFailureAt
string<date-time> | null
required

The most recent failing run Trunk still holds metrics for. Null if the test has never failed within that window.

Example:

"2026-06-10T12:30:00.000Z"

metrics
object | null

Returned only when include=metrics is set. Null when the test had no runs in period.