Get all on-call users using ОnCallRotation API

ralitsatodorova
Kilo Contributor

Hello,

I have a question regarding ServiceNow On-Call Scheduling capabilities.

I want to retrieve all the users that are on-call at the moment. What I've done so far - I've created a user group with some users in it, then I've created a new 24/7 schedule which applies to this group.

As far as I saw the OnCallRotation API exposes some scripts as REST endpoints and I tried to use them. So far I managed to get groups, rotas and rosters successfully using /api/now/on_call_rota/group, /api/now/on_call_rota/getrotasbygroup/{group_ids}, and /api/now/on_call_rota/getrostersbyrotas/{rota_id} endpoints respectively.

I saw there is an endpoint /api/now/on_call_rota/group/on_call/members which in my opinion seems to return the on-call users, but all I get from it is 200 OK Response with an empty result set.

Is my consideration correct and if not - which is the right way to get all on-call users at the moment?

Thanks,

Ralitsa

2 REPLIES 2

arpitgoel
Kilo Contributor

still looking for the oncall API to get all the users who are oncall at the moment for a group?

Jessie Westlake
Giga Contributor

/api/now/on_call_rota/whoisoncall?group_ids={group_ids}