https://manage.kontent.ai/v2/projects/{environment_id}/taxonomieshttps://manage.kontent.ai/v2/projects/{environment_id}/taxonomies/{taxonomy_group_identifier}https://manage.kontent.ai/v2/projects/{environment_id}/taxonomieshttps://manage.kontent.ai/v2/projects/{environment_id}/taxonomies/{taxonomy_group_identifier}https://manage.kontent.ai/v2/projects/{environment_id}/taxonomies/{taxonomy_group_identifier}environment_idThe taxonomy group to add.
codenameexternal_idnameterms[]codenameexternal_ididlast_modifiedenvironment_idtaxonomy_group_identifiercodenameexternal_ididlast_modifiedenvironment_idx-continuationtaxonomies[]environment_idtaxonomy_group_identifierThe operations to perform on the specified taxonomy group and its taxonomy terms.
codenameexternal_ididlast_modifiedenvironment_idtaxonomy_group_identifiernameterms[]nameterms[]paginationopreferencenameterms[]valueafterbeforeaddInto operation to add new objects. For example, add a taxonomy term to the taxonomy group.move operation to reorder objects. For example, change the position of taxonomy terms.remove operation to delete objects. For example, delete a taxonomy term from a taxonomy group.replace operation to update values. For example, replace the value of a specific object property such as a codename.path to the taxonomy term using a {path_reference}. Path references can use internal IDs, codenames, or external IDs.
id:5eb3d03e-c69d-4e93-b4cc-76f453271386codename:my_text_elementexternal_id:id_from_external_source – Special characters such as slashes (/) need to be escaped. For example, to reference an object using its external ID of my/value, you use a path reference of external_id:my\\/value.name and can later be modified.name and can later be modified.0be13600-e57c-577d-8108-c8d860330985), external ID (e.g., external-id/Tax-Group-123), or codename {e.g., codename/personas).name and can later be modified.x-continuation header parameter to the value of the continuation_token property.0be13600-e57c-577d-8108-c8d860330985), external ID (e.g., external-id/Tax-Group-123), or codename {e.g., codename/personas).name and can later be modified.0be13600-e57c-577d-8108-c8d860330985), external ID (e.g., external-id/Tax-Group-123), or codename {e.g., codename/personas).codenameexternal_ididlast_modifiednameterms[]name and can later be modified.{
"request_id": "9e6a2ec1-fb8e-49af-b1bc-011960ce4e2a",
"error_code": 107,
"message": "The requested taxonomy was not found."
}addInto to add new taxonomy termsmove to reorder taxonomy termsremove to delete taxonomy termsreplace to modify taxonomy groups and their terms{
"codename": "categories",
"external_id": "my-little-taxopony",
"id": "bef9dd62-a3b8-4146-83e4-33be707899b4",
"last_modified": "2020-11-14T14:05:43.9190528Z",
"name": "Categories",
"terms": {
"codename": "technology",
"external_id": "custom-term-identifier",
"id": "e3c04146-f5a6-49b0-ba5b-e040d126fb3a",
"name": "Technology",
"terms": []
}
}{
"codename": "categories",
"external_id": "my-little-taxopony",
"id": "bef9dd62-a3b8-4146-83e4-33be707899b4",
"last_modified": "2020-11-14T14:05:43.9190528Z",
"name": "Categories",
"terms": {
"codename": "technology",
"external_id": "custom-term-identifier",
"id": "e3c04146-f5a6-49b0-ba5b-e040d126fb3a",
"name": "Technology",
"terms": []
}
}{
"codename": "categories",
"external_id": "my-little-taxopony",
"id": "bef9dd62-a3b8-4146-83e4-33be707899b4",
"last_modified": "2020-11-14T14:05:43.9190528Z",
"name": "Categories",
"terms": {
"codename": "technology",
"external_id": "custom-term-identifier",
"id": "e3c04146-f5a6-49b0-ba5b-e040d126fb3a",
"name": "Technology",
"terms": []
}
}{
"taxonomies": {
"codename": "categories",
"external_id": "my-little-taxopony",
"id": "bef9dd62-a3b8-4146-83e4-33be707899b4",
"last_modified": "2020-11-14T14:05:43.9190528Z",
"name": "Categories",
"terms": {
"codename": "technology",
"external_id": "custom-term-identifier",
"id": "e3c04146-f5a6-49b0-ba5b-e040d126fb3a",
"name": "Technology",
"terms": []
}
},
"pagination": {
"continuation_token": "W3sidG9rZW4iOiIrUklEOn...",
"next_page": "https://manage.kontent.ai/v2/your/chosen/list/endpoint"
}
}// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.addTaxonomy()
.withData({
name: 'Personas',
externalId: 'Tax-Group-123',
codename: 'people',
terms: [
{
name: 'Coffee expert',
externalId: 'Tax-term-456',
codename: 'expert',
terms: [
{
name: 'Barista',
externalId: 'Tax-term-789',
},
{
name: 'Cafe owner',
externalId: 'Tax-term-101',
},
],
},
{
name: 'Coffee enthusiast',
codename: 'enthusiast',
externalId: 'Tax-term-112',
terms: [
{
name: 'Coffee lover',
codename: 'lover',
externalId: 'Tax-term-131',
},
{
name: 'Coffee blogger',
codename: 'blogger',
externalId: 'Tax-term-145',
},
],
},
],
})
.toPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.getTaxonomy()
.byTaxonomyCodename('categories')
// .byTaxonomyID('bef9dd62-a3b8-4146-83e4-33be707899b4')
// .byTaxonomyExternalID('my-little-taxopony')
.toPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
// Gets the first page of results
const response = await client.listTaxonomies().toPromise();
// Gets all pages of results
// const response = await client.listTaxonomies()
// .toAllPromise();
{
"last_modified": "2019-04-02T08:08:40.3083064Z",
"id": "f30c7f72-e9ab-8832-2a57-62944a038809",
"name": "Categories",
"codename": "category",
"terms": [
{
"id": "146c5e35-dffe-5977-b943-16f0e862af2e",
"name": "New taxonomy term",
"codename": "new_taxonomy_term",
"external_id": "my-new-term",
"terms": []
},
{
"id": "012a94e4-76b4-5a5d-95ce-164577c9b5e5",
"name": "First-level taxonomy term",
"codename": "first_term",
"terms": [
{
"id": "9b897d7b-ded7-5de1-aee1-1e90e43db747",
"name": "Second-level taxonomy term",
"codename": "second_term",
"terms": [
{
"id": "9bee9779-a9c6-5d66-875b-aaf7093b4ac2",
"name": "Third-level taxonomy term",
"codename": "third_level_taxonomy_term",
"terms": []
}
]
}
]
}
]
}// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.deleteTaxonomy()
.byTaxonomyId('dbff8416-c4c7-45d2-b497-a4a71a5cbe30')
// .byTaxonomyCodename('personas_222')
// .byTaxonomyExternalId('Tax-Group-124')
.toPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.modifyTaxonomy()
.byTaxonomyId('0be13600-e57c-577d-8108-c8d860330985')
// .byTaxonomyCodename('personas')
// .byTaxonomyExternalId('Tax-Group-123')
.withData([
{
op: 'replace',
property_name: 'name',
value: 'Categories',
},
{
op: 'replace',
property_name: 'codename',
value: 'category',
},
{
op: 'replace',
reference: {
codename: 'first_term',
},
property_name: 'terms',
value: [
{
name: 'Second-level taxonomy term',
codename: 'second_term',
terms: [
{
name: 'Third-level taxonomy term',
},
],
},
],
},
{
op: 'remove',
reference: {
external_id: 'unused-taxonomy-term',
},
},
{
op: 'addInto',
reference: {
codename: 'second_term',
},
value: {
name: 'New taxonomy term',
external_id: 'my-new-term',
},
},
])
.toPromise();