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 😅


Reply