Check levels before they are saved, such as a level being added in the dashboard.
const url = 'https://api.siteqwality.com/escalation_policy/readiness';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"levels":[{"level_number":1,"timeout_minutes":1,"target_user_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"target_schedule_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}]}'};
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/escalation_policy/readiness \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "levels": [ { "level_number": 1, "timeout_minutes": 1, "target_user_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "target_schedule_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] } ] }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Levels to check before they are saved, in order.
object
object
Position to insert at, 1 to the level count plus one; later levels move down. Default: last.
Example generated
{ "levels": [ { "level_number": 1, "timeout_minutes": 1, "target_user_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "target_schedule_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] } ]}Responses
Section titled “ Responses ”Readiness of every level
Whether every level of a policy reaches someone, per urgency.
object
The saved policy, or null for levels checked before they are saved.
True when every level reaches someone before its timeout at both urgencies.
object
Null for a level that is not saved yet.
The best any target reaches for critical and major incidents.
The best any target reaches for minor incidents.
object
The user paged: the target user, or whoever is on call now for a schedule.
The user’s name (or email), or the schedule’s name.
For a schedule, the on-call user’s name (or email).
Why nobody can be paged at all: user_removed, schedule_removed or nobody_on_call.
object
How well a page at one urgency reaches a target, best first.
The user’s rules for this urgency, in paging order.
object
Why this channel cannot page, or null when it can: phone_call_not_delivered,
channel_unknown, contact_method_invalid, contact_unverified,
recipient_suppressed or sms_quota.
The rule waits as long as the level or longer, so it fires after the level moved on.
object
How well a page at one urgency reaches a target, best first.
The user’s rules for this urgency, in paging order.
object
Why this channel cannot page, or null when it can: phone_call_not_delivered,
channel_unknown, contact_method_invalid, contact_unverified,
recipient_suppressed or sms_quota.
The rule waits as long as the level or longer, so it fires after the level moved on.
Every problem found, in level order.
object
no_targets, nobody_reachable, target_removed, nobody_on_call,
user_unreachable, fallback_only or delayed_past_timeout.
One sentence for the dashboard.
Example
{ "levels": [ { "high": "reachable", "low": "reachable", "targets": [ { "kind": "user", "high": { "status": "reachable", "channels": [ { "type": "email" } ] }, "low": { "status": "reachable", "channels": [ { "type": "email" } ] } } ] } ], "warnings": [ { "urgency": "high" } ]}Invalid request body, or a target user or schedule is not in this account
Missing or invalid authentication
Internal server error