Only active users in https://api.pagerduty.com/users/?

rest-api
users
questions

#1

Hi…is there a breakdown in the API of active vs. non-active users? Or do only active users (meaning using a license) come through the Users API?


(Demitri Morgan) #2

Hi,

The REST API will retrieve users irrespective of their activity. There are a few ways of obtaining a list of inactive users, and there’s an overview of how to do this here:


#3

Thanks Demitri,

That’s precisely what I’m doing. To be clear though, any user coming through the user API is consuming a seat license, correct? How does PagerDuty handle users that are no longer assigned a license? Is that handled completely through the log entries API?


(Jonathan Curry) #4

That’s right, any user that you get info for via the API or see in the web UI is a user that you’re paying for. The only difference between users from a billing perspective would be what type of user they are (full user or a stakeholder).

There’s no way to get info on a deleted user from our API or web UI. You’ll notice if you delete a user from PagerDuty that they are no longer returned in the list you get from a GET /users request, and trying to get info about the user via their ID with a GET /users/ID_HERE request will return an HTTP 404 with the following error:

{
    "error": {
        "message": "Not Found",
        "code": 2100
    }
}

(system) #5