Read All Populations
GET {{apiPath}}/environments/{{envID}}/populations
Use GET /environments/{{envID}}/populations
to return the complete list of population resources associated with the specified environment. The returned data includes the id
, which is the population ID required for many user-related API calls. It also shows the userCount
attribute, which identifies the number of users associated with the population.
You can extend the request by:
- Adding a paging value to limit the number of resources displayed per page. For example:
GET /environments/{{envID}}/populations?limit=100
. - Adding a SCIM filter for a population ID or population name to display only those resources associated with the specified population. Only the
id
andname
parameters are supported. For example:GET /environments/{{envID}}/populations?filter=id eq "60971d3b-cc5a-4601-9c44-2be541f91bf1"
orGET /environments/{{envID}}/populations?filter=name eq "dev"
. - Adding both of the above. For example:
GET /environments/{{envID}}/populations?filter=id eq "60971d3b-cc5a-4601-9c44-2be541f91bf1"&limit=50
. Both the paging limit and SCIM filter are nullable."
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations"}},"_embedded":{"populations":[{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations/5e5cf2d4-2e11-4efc-89f1-73110c277ded"}},"id":"5e5cf2d4-2e11-4efc-89f1-73110c277ded","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"Accounting","userCount":6,"createdAt":"2018-06-12T19:09:23.756Z"},{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations/14865d2f-5c28-40a2-97e7-10cb921e2ade"}},"id":"14865d2f-5c28-40a2-97e7-10cb921e2ade","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"Engineering","userCount":31,"createdAt":"2018-06-12T19:09:42.504Z"}]},"count":2,"size":2}