Lookup User with API

All API calls appear to be focused on getting users into Pagerduty, but we have a requirement to remove users that leave our company.

With the API calls, the user ID is the key info needed to perform most actions. I am not able to find an API call that allows me to search for a user to locate their ID based on ‘Email’ or ‘Name’ info.

Can anyone help me resolve this problem?

I see there’s a filter, but when I use the “Try It” nothing is filtered under the ‘List Users’ API call. :frowning:

Hey Scott,

You can search for users using the following: https://api.pagerduty.com/users/query={email_or_name_here}.

If you are using the “Try it” function on our API reference guide, please ensure that you are using an API key connected to your account, and not the sample API key.

Josef

Thanks Joseph, not to complain… but the API pages do not have any examples of how to do different searches. I’ll try your suggestion.