API Field in List users on call | Community
Skip to main content

Looking to use the API to determine who is on-call and the mandatory field is simply ā€˜id’. The description of the field is incredibly vague.Ā 

id (string)Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  required

The ID of the resource.

Where do I find this ā€˜id’ field? I have tried the URL ID from the service, policy & escalation policy id’s but nothing is working.Ā 

I’m using this APIĀ https://developer.pagerduty.com/api-reference/e1ad560792567-list-users-on-call

Ā 


Hi ​@Scott R,

The ā€œidā€ field required by the List users on call API is actually the Schedule ID. This endpoint is designed to return the users who are on call for a specific schedule, so you need to provide the ID of the schedule you want to query.

Where you can find the Schedule ID:

  • In the PagerDuty web UI, go to the ā€œSchedulesā€ section.
  • Click on the schedule you want.
  • The Schedule ID is in the URL, right after /schedules/. For example, if your URL is https://eyourdomain].pagerduty.com/schedules/PABC123, then PABC123 is your Schedule ID.
  • Use this Schedule ID as the ā€œidā€ parameter in your API call.

Please let me know if it works and have a nice day!


Hi ​@Scott R,

The ā€œidā€ field required by the List users on call API is actually the Schedule ID. This endpoint is designed to return the users who are on call for a specific schedule, so you need to provide the ID of the schedule you want to query.

Where you can find the Schedule ID:

  • In the PagerDuty web UI, go to the ā€œSchedulesā€ section.
  • Click on the schedule you want.
  • The Schedule ID is in the URL, right after /schedules/. For example, if your URL is https://eyourdomain].pagerduty.com/schedules/PABC123, then PABC123 is your Schedule ID.
  • Use this Schedule ID as the ā€œidā€ parameter in your API call.

Please let me know if it works and have a nice day!

Thank you this worked, but IĀ thought I had tried that.. I would hope Pagerduty would refine their documentation..Ā 


Happy that it worked ​@Scott R! And don’t worry, all your feedbackĀ here feeds an improvement pipeline, so the docs team will definitely look at this šŸ˜