Replace the on-call roster
const url = 'https://api.perstat.io/organizations/example/on-call/members';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"members":[{"position":1,"user_id":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.perstat.io/organizations/example/on-call/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "members": [ { "position": 1, "user_id": "example" } ] }'Replaces the ordered on-call rotation roster of the organization. Ids that are not current members are skipped; an empty list clears the roster, while a non-empty list in which no id resolves returns 400 to protect against accidental wipes. Requires organization admin rights and an on-call capable plan (402 otherwise). Accepts API keys with the on-call:write scope, subject to current role and resource grants.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Interner User-UUID.
Examplegenerated
{ "members": [ { "position": 1, "user_id": "example" } ]}Responses
Section titled “Responses”Request succeeded. The response body contains the result.
object
object
Interner User-UUID.
Examplegenerated
{ "members": [ { "position": 1, "user_id": "example" } ]}The request is invalid. Check the supplied fields and values.
Authentication is missing or invalid.
The request exceeds an entitlement or limit of the current plan.
The authenticated caller does not have permission to perform this operation.
No accessible resource matches the supplied identifier.