Update a taxonomy
put
/content/management/api/v1.1/taxonomies/{id}
with given payload. The field shortName must be unique and it will be auto-generated by the system if no value is provided.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
id of the taxonomy.
Query Parameters
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby
-
q(optional): string
This parameter accepts a query expression condition that matches the field values. Query conditions can be joined using AND operators and grouped with parentheses. The value of a query condition follows the format of {fieldName} {operator} "{fieldValue}". The only field names allowed are status, version, name, shortName, roleName and repositoryId. A query cannot include multiple status, version, name, shortName, roleName or repositoryId fieldNames. Both name and shortName cannot be specified in the same query.
If no value is provided for status it defaults to "promoted". When listing taxonomies, status can be equal to "draft", "promoted" or "all". When listing taxonomies, roleName can be equal to "viewer", "editor" or "manager". If status is equals to "all", all taxonomies will be retrieved - if a taxonomy is currently available in both "draft" and "promoted" states, only "draft" will be returned. In case status equals to "all" is used in other endpoints, an error will be returned.
The only value allowed in the operator is eq (Equals) for status, version, shortName, roleName and repositoryId.
The only value allowed in the operator is co (Contains) for name.
When updating a taxonomy the query parameter should always be provided with status set to "draft" as the default status is "promoted" and a promoted taxonomy cannot be modified.
Example:
https://{cecsdomain}/content/management/api/v1.1/taxonomies?q=(status eq "draft")
Example:
https://{cecsdomain}/content/management/api/v1.1/taxonomies?q=(status eq "promoted")
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
Update a taxonomy with the given information in the payload. The fields id, status, version, availableStates, publishedChannels, createdBy, createdDate, updatedBy, updatedDate and links will be ignored even if given in the payload.
When the field shortName is updated, all apiName values currently prefixed with the taxonomy shortName will be automatically updated for the entire "draft" taxonomy.
When the field shortName is updated, all apiName values currently prefixed with the taxonomy shortName will be automatically updated for the entire "draft" taxonomy.
Root Schema : Taxonomy
Type:
object
Taxonomy
Show Source
-
availableStates(optional):
array availableStates
List all states of the Taxonomy. This is an optional property and is only returned if requested in the fields parameter. It is ignored in post/put requests.
-
categoryProperties(optional):
object ItemSubResourceListCategoryPropertyDefinition
Item SubResource.
-
createdBy(optional):
string
The user who created the Taxonomy.
-
createdDate(optional):
object date
date
-
customProperties(optional):
object customProperties
Additional Properties Allowed: additionalPropertiesCustom properties of the Taxonomy. This consists of a name value pairs defined by the user. Single entries cannot be updated, the entire list of custom properties have to be provided to update entries.
-
description(optional):
string
The description of the Taxonomy.
-
id:
string
The id of the Taxonomy. This is a required property in the get response and ignored in post/put requests.
-
isForSiteManagement(optional):
boolean
Whether taxonomy is for site management. A site management taxonomy is not publishable. (defaults to false)
-
isPublishable(optional):
boolean
Whether taxonomy is publishable. (defaults to false)
-
links(optional):
array links
Links
-
name:
string
The name of the Taxonomy. It is a required property in the get response and cannot be empty in post/put request.
-
publishedChannels(optional):
array publishedChannels
Read Only:
true
Taxonomy published channels. -
roleName(optional):
string
name of the role on the resource.
-
shortName(optional):
string
The short name of the Taxonomy. This property is unique among all taxonomies and it is required in the get response. Up to 3 characters can be provided in a put/post request. If no value is provided, a default one will be generated.
-
status(optional):
string
Allowed Values:
[ "draft", "promoted" ]
The status of the Taxonomy. This is a required property in the get response and ignored in post/put requests. -
updatedBy(optional):
string
The user who last updated the Taxonomy.
-
updatedDate(optional):
object date
date
-
version(optional):
integer(int32)
Minimum Value:
1
The version of this Taxonomy. Version information is only returned for promoted taxonomies. It is ignored in post/put requests.
Nested Schema : availableStates
Type:
array
List all states of the Taxonomy. This is an optional property and is only returned if requested in the fields parameter. It is ignored in post/put requests.
Show Source
-
Array of:
object TaxonomyStatus
TaxonomyStatus
Nested Schema : ItemSubResourceListCategoryPropertyDefinition
Type:
object
Item SubResource.
Show Source
Nested Schema : customProperties
Type:
object
Additional Properties Allowed
Show Source
Custom properties of the Taxonomy. This consists of a name value pairs defined by the user. Single entries cannot be updated, the entire list of custom properties have to be provided to update entries.
Nested Schema : publishedChannels
Type:
array
Read Only:
true
Taxonomy published channels.
Show Source
-
Array of:
object ChannelInTaxonomy
ChannelInTaxonomy
Nested Schema : data
Type:
Show Source
array
-
Array of:
object CategoryPropertyDefinition
Category Property Definition
Nested Schema : CategoryPropertyDefinition
Type:
object
Category Property Definition
Show Source
-
apiName(optional):
string
Read Only:
true
Minimum Length:1
Maximum Length:64
API Name of the property. -
createdBy(optional):
string
Read Only:
true
The user who created the property. -
createdDate(optional):
object date
date
-
defaultValues(optional):
array defaultValues
Default values for the property.
-
description(optional):
string
Minimum Length:
0
Maximum Length:128
Description of the property. -
displayName:
string
Minimum Length:
1
Maximum Length:128
Display name of the property. -
id(optional):
string
Read Only:
true
id of the property. It is required in the GET response and PATCH request whereas it will be ignored in the POST request. -
isPublishable(optional):
boolean
Is the property publishable.
-
isSystemManaged(optional):
boolean
Read Only:
true
Is the property managed by the system. -
links(optional):
array links
Links
-
settings:
object PropertySettingsBean
-
updatedBy(optional):
string
Read Only:
true
The user who last updated the property. -
updatedDate(optional):
object date
date
-
valueCount:
string
Allowed Values:
[ "single", "list" ]
Value count as a single or list.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : PropertySettingsCaasBean
Type:
Show Source
object
-
customValidators(optional):
array customValidators
Custom validators for the property value.
-
editor(optional):
object PropertySettingsEditorBean
-
valueCountRange(optional):
object PropertySettingsValueCountRangeBean
Nested Schema : PropertySettingsEditorBean
Type:
Show Source
object
-
name(optional):
string
Name of the editor.
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesOptions of the property value.
Nested Schema : PropertySettingsValueCountRangeBean
Type:
Show Source
object
-
max(optional):
integer(int32)
Minimum Value:
1
Maximum count of the property value. -
min(optional):
integer(int32)
Minimum Value:
0
Minimum count of the property value.
Nested Schema : PropertySettingsValidatorBean
Type:
Show Source
object
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesValidator details.
-
type(optional):
string
Allowed Values:
[ "length" ]
Type of the validator.
Nested Schema : additionalProperties
Type:
object
Nested Schema : options
Type:
object
Additional Properties Allowed
Show Source
Options of the property value.
Nested Schema : additionalProperties
Type:
object
Nested Schema : ChannelInTaxonomy
Type:
object
ChannelInTaxonomy
Show Source
-
id(optional):
string
id of the channel.
-
name(optional):
string
Name of the channel.
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : Taxonomy
Type:
object
Taxonomy
Show Source
-
availableStates(optional):
array availableStates
List all states of the Taxonomy. This is an optional property and is only returned if requested in the fields parameter. It is ignored in post/put requests.
-
categoryProperties(optional):
object ItemSubResourceListCategoryPropertyDefinition
Item SubResource.
-
createdBy(optional):
string
The user who created the Taxonomy.
-
createdDate(optional):
object date
date
-
customProperties(optional):
object customProperties
Additional Properties Allowed: additionalPropertiesCustom properties of the Taxonomy. This consists of a name value pairs defined by the user. Single entries cannot be updated, the entire list of custom properties have to be provided to update entries.
-
description(optional):
string
The description of the Taxonomy.
-
id:
string
The id of the Taxonomy. This is a required property in the get response and ignored in post/put requests.
-
isForSiteManagement(optional):
boolean
Whether taxonomy is for site management. A site management taxonomy is not publishable. (defaults to false)
-
isPublishable(optional):
boolean
Whether taxonomy is publishable. (defaults to false)
-
links(optional):
array links
Links
-
name:
string
The name of the Taxonomy. It is a required property in the get response and cannot be empty in post/put request.
-
publishedChannels(optional):
array publishedChannels
Read Only:
true
Taxonomy published channels. -
roleName(optional):
string
name of the role on the resource.
-
shortName(optional):
string
The short name of the Taxonomy. This property is unique among all taxonomies and it is required in the get response. Up to 3 characters can be provided in a put/post request. If no value is provided, a default one will be generated.
-
status(optional):
string
Allowed Values:
[ "draft", "promoted" ]
The status of the Taxonomy. This is a required property in the get response and ignored in post/put requests. -
updatedBy(optional):
string
The user who last updated the Taxonomy.
-
updatedDate(optional):
object date
date
-
version(optional):
integer(int32)
Minimum Value:
1
The version of this Taxonomy. Version information is only returned for promoted taxonomies. It is ignored in post/put requests.
Nested Schema : availableStates
Type:
array
List all states of the Taxonomy. This is an optional property and is only returned if requested in the fields parameter. It is ignored in post/put requests.
Show Source
-
Array of:
object TaxonomyStatus
TaxonomyStatus
Nested Schema : ItemSubResourceListCategoryPropertyDefinition
Type:
object
Item SubResource.
Show Source
Nested Schema : customProperties
Type:
object
Additional Properties Allowed
Show Source
Custom properties of the Taxonomy. This consists of a name value pairs defined by the user. Single entries cannot be updated, the entire list of custom properties have to be provided to update entries.
Nested Schema : publishedChannels
Type:
array
Read Only:
true
Taxonomy published channels.
Show Source
-
Array of:
object ChannelInTaxonomy
ChannelInTaxonomy
Nested Schema : data
Type:
Show Source
array
-
Array of:
object CategoryPropertyDefinition
Category Property Definition
Nested Schema : CategoryPropertyDefinition
Type:
object
Category Property Definition
Show Source
-
apiName(optional):
string
Read Only:
true
Minimum Length:1
Maximum Length:64
API Name of the property. -
createdBy(optional):
string
Read Only:
true
The user who created the property. -
createdDate(optional):
object date
date
-
defaultValues(optional):
array defaultValues
Default values for the property.
-
description(optional):
string
Minimum Length:
0
Maximum Length:128
Description of the property. -
displayName:
string
Minimum Length:
1
Maximum Length:128
Display name of the property. -
id(optional):
string
Read Only:
true
id of the property. It is required in the GET response and PATCH request whereas it will be ignored in the POST request. -
isPublishable(optional):
boolean
Is the property publishable.
-
isSystemManaged(optional):
boolean
Read Only:
true
Is the property managed by the system. -
links(optional):
array links
Links
-
settings:
object PropertySettingsBean
-
updatedBy(optional):
string
Read Only:
true
The user who last updated the property. -
updatedDate(optional):
object date
date
-
valueCount:
string
Allowed Values:
[ "single", "list" ]
Value count as a single or list.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : PropertySettingsCaasBean
Type:
Show Source
object
-
customValidators(optional):
array customValidators
Custom validators for the property value.
-
editor(optional):
object PropertySettingsEditorBean
-
valueCountRange(optional):
object PropertySettingsValueCountRangeBean
Nested Schema : PropertySettingsEditorBean
Type:
Show Source
object
-
name(optional):
string
Name of the editor.
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesOptions of the property value.
Nested Schema : PropertySettingsValueCountRangeBean
Type:
Show Source
object
-
max(optional):
integer(int32)
Minimum Value:
1
Maximum count of the property value. -
min(optional):
integer(int32)
Minimum Value:
0
Minimum count of the property value.
Nested Schema : PropertySettingsValidatorBean
Type:
Show Source
object
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesValidator details.
-
type(optional):
string
Allowed Values:
[ "length" ]
Type of the validator.
Nested Schema : additionalProperties
Type:
object
Nested Schema : options
Type:
object
Additional Properties Allowed
Show Source
Options of the property value.
Nested Schema : additionalProperties
Type:
object
Nested Schema : ChannelInTaxonomy
Type:
object
ChannelInTaxonomy
Show Source
-
id(optional):
string
id of the channel.
-
name(optional):
string
Name of the channel.
400 Response
Bad request.
403 Response
Forbidden.
404 Response
Taxonomy not found. The requested resource not found.
500 Response
Internal server error.
Examples
The following examples show how to update the existing draft taxonomies by submitting a PUT request on the REST resource using cURL.
Note:
Only draft taxonomies can be updated.curl -X PUT -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/taxonomies/{id}?q=(status eq \"draft\")'
Example 1:
This updates the name of the taxonomy identified by the ID in the URL.
/content/management/api/v1.1/taxonomies/A261541051AF4DCDBAB127C759C5532A?q=(status eq \"draft\")
Request Body
{ "name": "New name" }
Example 2:
This updates the short name of the taxonomy identified by the ID in the URL.
/content/management/api/v1.1/taxonomies/A261541051AF4DCDBAB127C759C5532A?q=(status eq \"draft\")
Request Body
{ "name": "Existing name", "shortName": "NEW" }
Example 3:
This updates the name and short name of the taxonomy identified by the ID in the URL.
/content/management/api/v1.1/taxonomies/A261541051AF4DCDBAB127C759C5532A?q=(status eq \"draft\")
Request Body
{ "name": "New name", "shortName": "NEW" }
Example 4:
This updates the name, short name, and replaces all existing custom properties for the taxonomy identified by the ID in the URL.
/content/management/api/v1.1/taxonomies/A261541051AF4DCDBAB127C759C5532A?q=(status eq \"draft\")
Request Body
{ "name": "New name", "shortName": "NEW", "customProperties": { "new property 1": "new value 1" } }
Example 5:
This updates the name of the taxonomy and removes any custom properties.
/content/management/api/v1.1/taxonomies/A261541051AF4DCDBAB127C759C5532A?q=(status eq \"draft\")
Request Body
{ "name": "New name", "customProperties": { } }
Example 6:
This updates the name and the server provides a short name for the taxonomy identified by the ID in the url.
/content/management/api/v1.1/taxonomies/A261541051AF4DCDBAB127C759C5532A?q=(status eq \"draft\")
Request Body
{ "name": "New name", "shortName": "" }