I’m working on a program for updating schedules in Pagerduty. Basically, the program will take a text file as input, containing the date and the name of the duty programmer, and will use a PUT to update the schedule.
The program is written in python, but I’m starting out by playing around with curl commands. I think I’ve figured out the quirks of updating the schedule itself, but the piece I’m stuck on now is mapping user names to IDs, so I can provide the IDs when I update the schedule. I’d like to be able to query users by team ID, but when I try, I get back all of the users, not just those users on my team.
curl -H “Accept: application/vnd.pagerduty+json;version=2” -H “Authorization: Token token=” -X GET ‘https://api.pagerduty.com/users?team_id=P448VD9’
Any suggestions about how I can limit the results of this query to only those users belonging to a particular team?
Thanks in advance!