Mute a monitor for many tests
Requires the Mute monitors permission.
Mutes the monitor for each listed test, as POST /v2/monitors/{monitorId}/tests/{testId}/mute does for one, and reports each test’s outcome in request order. At most 100 tests, and a test listed twice refuses the whole request with VALIDATION_FAILED, as does a muteUntil that is not in the next 30 days.
Each item either succeeded, was unchanged (already muted; its end and reason stay as they were), or failed with an error: TEST_NOT_FOUND for an id that is not a test of the monitor’s collection, MONITOR_NOT_ACTIVE for a test the monitor is not active on, and INTERNAL_ERROR for one that could not be saved, which kept nothing and may be sent again. One item failing does not undo the others.
Muting a monitor for a test stops it from counting toward the test’s status, and removes the labels it applied to the test, as muting it in the web app does. Unmuting puts both back. A change to a monitor that classifies reconciles the test’s status, which can send the v2.test_case.status_changed webhook.
The change is recorded as made by the person whose token made the call, and as API token for an API token, on the test’s state and in the mute history.
Idempotency-Key is not honored. The change is idempotent by state, so a request whose outcome is unknown is safe to send again: a test already in the requested state reports unchanged.
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 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
Body
The tests to mute the monitor for, with one end and reason.
Response
Each test's outcome, in request order
The outcome of each item of a many-form request. A request that is refused as a whole answers a coded error instead, never a BulkResult.