Update Attribute (Put)
PUT {{apiPath}}/environments/{{envID}}/schemas/{{schemaID}}/attributes/{{schemaAttrID}}
You can also update existing attribute properties using PUT /environments/{{envID}}/schemas/{{schemaID}}/attributes/{{schemaAttrID}}
. The PUT
operation removes any existing attribute properties omitted from the request body.
An attribute can support multiple values if the multiValued
property is set to true. If the multiValued
property is set to false or is null, the User object will contain the attribute value as a single value. If multiValued
is set to true, the value in the User object will be an array. When searches are performed on User schema data, a user will match if any value of a multiValued
attribute is part of the search criteria.
Prerequisites
See Schemas for important overview information.
Read all available schemas and select a
schemaID
for the endpoint.
See the Schema attributes POST, PUT, PATCH data model for full property descriptions.
Property | Type | Required? |
---|---|---|
description | String | Optional |
displayName | String | Optional |
enabled | Boolean | Required |
enumeratedValues\[\] | Array | Optional |
enumeratedValues\[\].value | String | Required |
enumeratedValues\[\].archived | Boolean | Optional |
enumeratedValues\[\].description | String | Optional |
ldapAttribute | String | Required |
multiValued | Boolean | Optional |
name | String | Required |
regexValidation | Object | Optional |
regexValidation.pattern | String | Required |
regexValidation.requirements | String | Required |
regexValidation.valuesPatternShouldMatch | Array | Optional |
regexValidation.valuesPatternShouldNotMatch | Array | Optional |
required | Boolean | Optional |
schema.id | String | Required |
schemaType | String | Required |
subAttributes | Array | Optional |
subAttributes.description | String | Optional |
subAttributes.displayName | String | Optional |
subAttributes.enabled | Boolean | Required |
subAttributes.name | String | Required |
subAttributes.required | Boolean | Optional |
subAttributes.schemaType | String | Required |
subAttributes.type | String | Optional |
subAttributes.unique | Boolean | Required |
type | String | Optional |
unique | Boolean | Required |
Request Body
{"name"=>"officeLocation", "displayName"=>"An optional property that specifies the display name of the attribute.", "description"=>"An optional property that specifies the description of the new attribute.", "schemaType"=>"CUSTOM", "type"=>"STRING", "unique"=>true, "enabled"=>false, "multiValued"=>false}
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/schemas/6497b7af-99d1-4217-8a82-057fcc3b7401/attributes/0d5fe0cc-ad79-41d8-b1f5-270c4e807bd0"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"schema":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/schemas/6497b7af-99d1-4217-8a82-057fcc3b7401"}},"id":"0d5fe0cc-ad79-41d8-b1f5-270c4e807bd0","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"officeLocation","displayName":"An optional property that specifies the display name of the attribute.","description":"An optional property that specifies the description of the new attribute.","schemaType":"CUSTOM","type":"STRING","unique":true,"enabled":false,"multiValued":false,"required":false,"schema":{"id":"6497b7af-99d1-4217-8a82-057fcc3b7401"}}