Taxonomy

View as Markdown

Taxonomy

Taxonomy helps you categorize pieces of content within your stack to facilitate easy navigation, search, and retrieval of information. You can hierarchically organize your web properties based on your requirements, such as their purpose, target audience, or any other aspects of your business.

Note The Taxonomy feature is currently released as part of an Early Access program and may not be available to all users. For more information, you can reach out to our support team.

create

The create method lets you add a new taxonomy to your stack.

NameTypeDescription
data (required)dict

The data to be sent in the request body

data ={
       "taxonomy": {
           "uid": "taxonomy12345",
           "name": "Taxonomy 12345",
           "description": "Description for Taxonomy 1"
       }
       }
import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack('api_key').taxonomy().create(data).json()

delete

The delete method lets you remove an existing taxonomy from your stack.

NameTypeDescription
taxonomy_uid (required)str

UID of the taxonomy

import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = result = client.stack('api_key').taxonomy('taxonomy_uid').delete('taxonomy_uid').json()

fetch

The fetch method lets you retrieve information about a specific taxonomy in your stack.

NameTypeDescription
taxonomy_uid (required)str

UID of the taxonomy

import contentstack_management

client = contentstack_management.Client(authtoken='your_authtoken')

result = client.stack('api_key').taxonomy('taxonomy_uid').fetch('taxonomy_uid').json()

find

The find method lets you retrieves the list of all the taxonomies in your stack.

import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack("api_key").taxonomy().find().json()

update

The update method lets you update the details of an existing taxonomy in your stack.

NameTypeDescription
data (required)dict

The request body to be sent in the call

data ={
   "taxonomy": {
       "name": "Taxonomy 12345",
       "description": "Description updated for Taxonomy 12345"
   }
   }
import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack('api_key').taxonomy("taxonomy_uid").update(data).json()