Create a taxonomy
post
/content/management/api/v1.1/taxonomies
with given payload. The field shortName must be unique and it will be auto-generated by the system if no value is provided. The system managed category properties such as synonyms, keywords and relatedCategories will be assigned to the taxonomy by default on creation.
Request
Supported Media Types
- application/json
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
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
Creates a taxonomy with the given information in the payload. The fields id, createdBy, createdDate, updatedBy, updatedDate, status, version, availableStates, publishedChannels, categoryProperties and links will be ignored even if given in the payload.
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
201 Response
Created.
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.
500 Response
Internal server error.
Examples
The following examples show how to create taxonomies by submitting a POST request on the REST resource using cURL:
curl -X POST -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/taxonomies'
Example 1:
This example shows how to create a taxonomy with a given name.
Note:
The shortName is generated from the first three characters excluding spaces./content/management/api/v1.1/taxonomies
Request Body
{ "name": "New Taxonomy" }
Example 2:
This example shows how to create a taxonomy with a given name and the generated short name Tax.
/content/management/api/v1.1/taxonomies
Request Body
{ "name": "New Taxonomy", "shortName": "TAX" }
Example 3:
This example shows how to create a taxonomy with a given name and a custom property.
/content/management/api/v1.1/taxonomies
Request Body
{ "name": "New Taxonomy", "customProperties": { "property 1": "value 1" } }
Example 4:
This example shows how to create a taxonomy with a given name, short name, and two custom properties.
/content/management/api/v1.1/taxonomies
Request Body
{ "name": "New Taxonomy", "shortName": "SRT" "customProperties": { "property 1": "value 1", "property 2": "value 2" } }