Create a monitor
Requires the Manage monitors permission.
Adds a monitor to the collection, enabled unless enabled is false. It starts with no actions: it detects tests but classifies and labels none until actions are added in the web app. A collection holds at most 10 monitors of each type (409 MONITOR_LIMIT_EXCEEDED).
The config is checked against the same rules as the web app’s monitor settings: a value out of range, or branches sent with pullRequestOnly: true, is a 400.
The change is recorded as made by the person whose token made the call.
Idempotency-Key is not honored. A request whose outcome is unknown may have created the monitor: list the collection’s monitors before sending it again.
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
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
A new monitor. config holds the fields of its monitorType; an optional field left out is unset.
Response
The new monitor
- 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.