Get current on-call duty
GET
/organizations/{org_id}/on-call/duty
const url = 'https://api.perstat.io/organizations/example/on-call/duty';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.perstat.io/organizations/example/on-call/duty \ --header 'Authorization: Bearer <token>'Resolves who is currently on call for the organization from its rotation settings. Returns the user on duty, or a coverage gap flag when no rotation is configured or nobody is scheduled right now.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org_id
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
coverage_gap
required
boolean
current_duty_user_id
string | null
Examplegenerated
{ "coverage_gap": true, "current_duty_user_id": "example"}