Edit a monitor
Requires the Manage monitors permission.
A merge patch: name, enabled and the fields of config that are sent change, and the rest keep their values. null unsets an optional config field. monitorType cannot change. A config that is valid only for another monitor type is a 422, and one that mixes fields of two types is a 400; a value out of range, or branches with pullRequestOnly: true, is a 400. Sending pullRequestOnly: false alone makes a pull-request-only monitor watch every branch.
Turning a monitor off deactivates it on every test it is active on, shortly after this answers, as it does in the web app: a test it classified recovers unless another monitor holds it. A config change takes effect at the monitor’s next detection run.
The change is recorded as made by the person whose token made the call.
Idempotency-Key is not honored. The edit is idempotent by state.
A monitor in another organization is reported as 404, not 403.
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
A merge patch. monitorType cannot change, and sending it is a 400.
Response
The monitor after the edit
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
A monitor on one test collection. config holds the fields of its monitorType.