Create Population
POST {{apiPath}}/environments/{{envID}}/populations
You can use POST /environments/{{envID}}/populations/ to create a new population resource in the specified environment.
In the request body, the population name is a required property. The description property is optional.
An optional default property can be used to assign the population as the default for the environment. When new users are created in an environment, they are assigned to the environment's default population, unless otherwise specified. When default is set to true, all other populations within the environment are set to false.
Populations, by default, use the password policy of their environment. However, you can optionally assign a password policy specific to this population with the passwordPolicy.id property in the request body. To unassign the passwordPolicy.id property, omit passwordPolicy.id from the request body and the population again uses the default password policy.
Prerequisites
See Populations for important overview information.
Create a password policy to get a
passwordPolicyIDfor the body. See also Identity Management, especially Password Policies.
| Property | Type | Required? |
|---|---|---|
description | String | Optional |
name | String | Required |
default | Boolean | Optional |
passwordPolicy.id | String | Optional |
See the Populations data model for full property descriptions.
Request Body
{"name"=>"Accounting", "description"=>"Accounting group", "default"=>false, "passwordPolicy"=>{"id"=>"{{passwordPolicyID}}"}}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations/941b174d-1471-47e0-8ebf-fd934c472deb"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"941b174d-1471-47e0-8ebf-fd934c472deb","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"Accounting","description":"Accounting group","userCount":0,"createdAt":"2022-02-07T22:17:16.241Z","updatedAt":"2022-02-07T22:17:16.241Z","passwordPolicy":{"id":"3d36d311-c424-4b61-b1da-865faced4d00"},"default":false}