cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
869
Views
5
Helpful
1
Replies

Find "Active Schedule" of a User via CUPI

istibekesi
Level 1
Level 1

I'm trying to figure out how the "user" and the it's "active schedule" are linked together?

Opening the user admin page, I can see a dropdown list for the user: "Active Schedule". The source of this dropdown seems to hold "Schedule Set" objects, rest endpoint /vmrest/schedulesets

Within "schedulesets" I can list one of them, and see the "schedulesetmembers":
1. GET /vmrest/schedulesets
2. GET /vmrest/schedulesets/f42370a8-4921-4453-bfd6-49edc3879d41
3. GET /vmrest/schedulesets/f42370a8-4921-4453-bfd6-49edc3879d41/schedulesetmembers/27265961-e229-475a-b7f3-fb2295a34552

This last response holds more links to schedule objects, one of them:
4. GET /vmrest/schedules/27265961-e229-475a-b7f3-fb2295a34552c

This item is actually mapped to a user's SynchScheduleObjectId.
5. GET /vmrest/users/eddc5c3a-699c-4666-9e7b-89197fdf590c


This is already pretty difficult, but my real the other way round seems even more complicated.

So, my question is: How can I retrieve the "Active Schedule" for an existing Unity user via CUPI API?

(Input: user object id, how to get output: schedule set object id?)

1 Reply 1

istibekesi
Level 1
Level 1

Meanwhile I've figured it out.

1. GET /vmrest/users/<user-object-id>

Response User object's : SynchScheduleObjectId is not the "Active Schedule", as I assumed before.

Instead, I can get "Active Schedule" value through the corresponding call handler:

1. GET /vmrest/users/<user-object-id>

Follow response User objec's: CallHandlerObjectId

2. GET /vmrest/handlers/callhandlers/<callhandler-object-id>
Follow response CallHandler object's: ScheduleSetObjectId

3. GET /vmrest/schedulesets/<scheduleset-object-id>
Returns the desired Schedule Set

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: