Update Attribute (Patch)

PATCH {{apiPath}}/environments/{{envID}}/schemas/{{schemaID}}/attributes/{{schemaAttrID}}

For schema attribute updates, both PUT and PATCH contracts are supported. The following sample shows the PATCH /environments/{{envID}}/schemas/{{schemaID}}/attributes/{{schemaAttrID}} operation to update existing attribute properties. For the PATCH operation, the update operation targets only those attribute property values specified in the request body. Attribute properties omitted from the request body are not updated or removed.

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", "type"=>"STRING", "unique"=>true, "enabled"=>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/cc1ffe4e-9129-4fb0-8962-23c760c52aff"},"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":"cc1ffe4e-9129-4fb0-8962-23c760c52aff","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"}}