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 the Schema attributes POST, PUT, PATCH data model for full property descriptions.

PropertyTypeRequired?
descriptionStringOptional
displayNameStringOptional
enabledBooleanRequired
enumeratedValues\[\]ArrayOptional
enumeratedValues\[\].valueStringRequired
enumeratedValues\[\].archivedBooleanOptional
enumeratedValues\[\].descriptionStringOptional
ldapAttributeStringRequired
multiValuedBooleanOptional
nameStringRequired
regexValidationObjectOptional
regexValidation.patternStringRequired
regexValidation.requirementsStringRequired
regexValidation.valuesPatternShouldMatchArrayOptional
regexValidation.valuesPatternShouldNotMatchArrayOptional
requiredBooleanOptional
schema.idStringRequired
schemaTypeStringRequired
subAttributesArrayOptional
subAttributes.descriptionStringOptional
subAttributes.displayNameStringOptional
subAttributes.enabledBooleanRequired
subAttributes.nameStringRequired
subAttributes.requiredBooleanOptional
subAttributes.schemaTypeStringRequired
subAttributes.typeStringOptional
subAttributes.uniqueBooleanRequired
typeStringOptional
uniqueBooleanRequired

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"}}