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