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
Path Parameters
Query Parameters
  • 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
Body ()
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.
Root Schema : Taxonomy
Type: object
Taxonomy
Show Source
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
Nested Schema : ItemSubResourceListCategoryPropertyDefinition
Type: object
Item SubResource.
Show Source
Nested Schema : date
Type: object
date
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
Nested Schema : TaxonomyStatus
Type: object
TaxonomyStatus
Show Source
Nested Schema : jobs
Type: array
Show Source
Nested Schema : TaxonomyJobInfo
Type: object
TaxonomyJobInfo
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : CategoryPropertyDefinition
Type: object
Category Property Definition
Show Source
Nested Schema : defaultValues
Type: array
Default values for the property.
Show Source
Nested Schema : PropertySettingsBean
Type: object
Show Source
Nested Schema : PropertySettingsCaasBean
Type: object
Show Source
Nested Schema : customValidators
Type: array
Custom validators for the property value.
Show Source
Nested Schema : PropertySettingsEditorBean
Type: object
Show Source
Nested Schema : PropertySettingsValueCountRangeBean
Type: object
Show Source
Nested Schema : PropertySettingsValidatorBean
Type: object
Show Source
Nested Schema : options
Type: object
Additional Properties Allowed
Show Source
Validator details.
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
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Taxonomy
Type: object
Taxonomy
Show Source
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
Nested Schema : ItemSubResourceListCategoryPropertyDefinition
Type: object
Item SubResource.
Show Source
Nested Schema : date
Type: object
date
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
Nested Schema : TaxonomyStatus
Type: object
TaxonomyStatus
Show Source
Nested Schema : jobs
Type: array
Show Source
Nested Schema : TaxonomyJobInfo
Type: object
TaxonomyJobInfo
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : CategoryPropertyDefinition
Type: object
Category Property Definition
Show Source
Nested Schema : defaultValues
Type: array
Default values for the property.
Show Source
Nested Schema : PropertySettingsBean
Type: object
Show Source
Nested Schema : PropertySettingsCaasBean
Type: object
Show Source
Nested Schema : customValidators
Type: array
Custom validators for the property value.
Show Source
Nested Schema : PropertySettingsEditorBean
Type: object
Show Source
Nested Schema : PropertySettingsValueCountRangeBean
Type: object
Show Source
Nested Schema : PropertySettingsValidatorBean
Type: object
Show Source
Nested Schema : options
Type: object
Additional Properties Allowed
Show Source
Validator details.
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

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Taxonomy not found. The requested resource not found.

500 Response

Internal server error.
Back to Top

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": ""
}
Back to Top