REST API - Find the current primary on-call person for a given group?

schn05731
Kilo Explorer

Is it possible to get the current primary on-call person for a given group using the REST API?  If so, which table(s) would I need to use?

6 REPLIES 6

Mike Patel
Tera Sage

I think you can get the info from cmn_rota_member (labeled as On-Call Member) table

cmn_rota_member doesn't appear to have any links to groups.

 

What I've done so far is query the sys_user_group table for the given group.  Then search the cmn_rota table for an entry that references the group sys_id.  That cmn_rota result has links to a parent schedule.  Then, searching the cmn_schedule table for schedules that have a parent matching the previously found parent schedule returns the child schedules.  Each child schedule has links to cmn_rota_member entries.  From there the trail goes cold.  I'm not sure how to tell which user is currently the primary.  Or maybe there's an easier way?

Other tables that may play a part:  cmn_rota_rotation, v_user_rotation ?

Other option is to look at UI page called 'user_on_call_schedule' and look at processing script how it's building the calendar view.

Where would I find the script?  In the browser developer tools window?