Add a monitor to an incident.
POST
/incident/{incident_id}/monitors
const url = 'https://api.siteqwality.com/incident/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/monitors';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"monitor_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","monitor_type":"http","impact":"degraded"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/incident/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/monitors \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "monitor_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "monitor_type": "http", "impact": "degraded" }'A monitor already on the incident is left as it is. Returns every monitor of the incident.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” incident_id
required
string format: uuid
Incident identifier
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”The incident’s monitors
Media type application/json
Array<object>
object
monitor_id
required
string format: uuid
monitor_type
required
string
name
Null when the monitor was deleted.
string | null
impact
source
required
auto when a failure joined it, manual when someone added it.
string
joined_at
required
string format: date-time
recovered_at
string | null format: date-time
Example
[ { "monitor_type": "http", "impact": "degraded", "source": "auto" }]Malformed JSON body
Missing or invalid authentication
Incident or monitor not found
The incident was merged into another; data holds its current state
Unknown monitor_type or impact
Internal server error