Add people to an incident and page them.
const url = 'https://api.siteqwality.com/incident/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/participants';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"user_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","schedule_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","escalation_policy_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","role":"lead","page":true}'};
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/participants \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "schedule_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "escalation_policy_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "role": "lead", "page": true }'Send exactly one of user_id, schedule_id (whoever is on call now) or
escalation_policy_id (its first level, as it would page now). A lead must
be a user_id. Someone already on the incident keeps their role and is
paged again when page is true. Participants are not billed responders.
Returns every participant of the incident.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Incident identifier
Request Body required
Section titled “Request Body required ”Exactly one of user_id, schedule_id and escalation_policy_id.
object
Adds whoever is on call now.
Adds the first level’s users and on-call people.
Page each added user through their notification rules (default true).
Responses
Section titled “ Responses ”The incident’s participants
object
Who added them; the acknowledger for an automatic lead.
When they were paged on being added; null when they were not.
Example
[ { "role": "lead" }]Not exactly one of user_id, schedule_id and escalation_policy_id, a lead that is not a user_id, or paging an incident without a service
Missing or invalid authentication
Incident, user, schedule or escalation policy not found
The incident was merged, a resolved incident cannot page, or nobody is on call; data holds its current state
Unknown role
Internal server error