0
votes

Good morning team,

We are trying to get all shift per-users on TEAMS SHIFT on API.

It seems we just can't get which API provides the information below.

enter image description here

When I do "Network" inspect online it seems the api calls this URL "https://api-nam1.staffhub.office.com/api/tenants/{tenant_id}/teams/{team_id}/shiftrequests" but this API standard is not documented on https://docs.microsoft.com/en-us/graph/api/team-get?view=graph-rest-1.0&tabs=http.

Do you guys have an idea? (Been stuck on this for days)

Also,

The API that I tried was this one https://docs.microsoft.com/en-us/graph/api/schedule-list-shifts?view=graph-rest-1.0&tabs=http but the data is old (From March 03/2020) is there a way i can specify date ?

1
If any information or misunderstanding please let me know. - Jaime Santos
Jaime, you need to use the one Stefan provided. - Abhijit
Thanks, Stefan. I used it before and it seems that it only returns 4 blue shifts. But our list has approximately 30 engineers. - Jaime Santos
@StefanWang Forgot to tag you on the response above. "Thanks, Stefan. I used it before and it seems that it only returns 4 blue shifts. But our list has approximately 30 engineers" - Jaime Santos

1 Answers

0
votes
  • To get team members' shared shift, you should use schedule-list-shifts
  • To get team members' all shifts, you should use shiftrequests

As shiftrequests is now deprecated, you have to use timeoffreasons instead. You can find the docs here