Spaces
Space object
idstring · read-only · uuid
The space's internal ID.
namestring · 1-200 chars
The space's display name.
codenamestring · 1-210 chars
The space's codename.
web_spotlight_root_itemobject · nullable
Deprecated
Reference to the root content item used to build the navigation tree.
root_itemobject · nullable
Reference to the root content item used to build the navigation tree.
JSON
{
"id": "6291c693-f6e4-4a6b-ac67-5c31c32f9388",
"name": "Space 1",
"codename": "space_1",
"web_spotlight_root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53",
"codename": "object_codename",
"external_id": "your-own-custom-identifier"
},
"root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53",
"codename": "object_codename",
"external_id": "your-own-custom-identifier"
},
"collections": [
{
"id": "511d4c6e-ff91-453e-9850-774867780ea3"
},
{
"id": "faa44123-a826-4d78-9d2d-2fde10fb0d56"
},
{
"id": "3c70b0cc-d9d8-4c9d-a01f-47a2d677fdd5"
}
]
}Add a space
Create a new space in your environment.
POST
https://manage.kontent.ai/v2/projects/{environment_id}/spacesRequest
Path parameters
environment_idrequired · string
Identifies your environment.
Body schema
Application/json
The space to be added.
namestring · 1-200 chars
The space's display name.
codenamestring · 1-210 chars
The space's codename.
web_spotlight_root_itemobject · nullable
Deprecated
Reference to the root content item used to build the navigation tree.
root_itemobject · nullable
Reference to the root content item used to build the navigation tree.
Request samples
TypeScript
C#
cURL
// 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
.addSpace()
.withData({
name: 'my new_space',
codename: 'my_new_space',
})
.toPromise();
Response
Status (201)
The space was created.
idstring · read-only · uuid
The space's internal ID.
namestring · 1-200 chars
The space's display name.
codenamestring · 1-210 chars
The space's codename.
web_spotlight_root_itemobject · nullable
Deprecated
Reference to the root content item used to build the navigation tree.
root_itemobject · nullable
Reference to the root content item used to build the navigation tree.
Example responses
201
400
{
"id": "6291c693-f6e4-4a6b-ac67-5c31c32f9388",
"name": "Space 1",
"codename": "space_1",
"web_spotlight_root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"collections": [
{
"id": "511d4c6e-ff91-453e-9850-774867780ea3"
},
{
"id": "faa44123-a826-4d78-9d2d-2fde10fb0d56"
},
{
"id": "3c70b0cc-d9d8-4c9d-a01f-47a2d677fdd5"
}
]
}Retrieve a space
Retrieve a space from your environment.
GET
https://manage.kontent.ai/v2/projects/{environment_id}/spaces/{space_identifier}Request
Path parameters
environment_idrequired · string
Identifies your environment.
space_identifierrequired · string
Identifies a space by it's internal ID (eg.,
6291c693-f6e4-4a6b-ac67-5c31c32f9388) or codename (eg., codename/space_1)Request samples
TypeScript
C#
cURL
// 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
.viewSpace()
.bySpaceCodename('my_new_space')
.toPromise();
Response
Status (200)
A single space object.
idstring · read-only · uuid
The space's internal ID.
namestring · 1-200 chars
The space's display name.
codenamestring · 1-210 chars
The space's codename.
web_spotlight_root_itemobject · nullable
Deprecated
Reference to the root content item used to build the navigation tree.
root_itemobject · nullable
Reference to the root content item used to build the navigation tree.
Example responses
200
404
{
"id": "6291c693-f6e4-4a6b-ac67-5c31c32f9388",
"name": "Space 1",
"codename": "space_1",
"web_spotlight_root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"collections": [
{
"id": "511d4c6e-ff91-453e-9850-774867780ea3"
},
{
"id": "faa44123-a826-4d78-9d2d-2fde10fb0d56"
},
{
"id": "3c70b0cc-d9d8-4c9d-a01f-47a2d677fdd5"
}
]
}List spaces
Retrieve a list of spaces from your environment
GET
https://manage.kontent.ai/v2/projects/{environment_id}/spacesRequest
Path parameters
environment_idrequired · string
Identifies your environment.
Request samples
TypeScript
C#
cURL
// 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.listSpaces().toPromise();
Response
Status (200)
A list of spaces.
array
Example responses
200
{
"": [
{
"id": "6291c693-f6e4-4a6b-ac67-5c31c32f9388",
"name": "Space 1",
"codename": "space_1",
"web_spotlight_root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"collections": [
{
"id": "511d4c6e-ff91-453e-9850-774867780ea3"
},
{
"id": "faa44123-a826-4d78-9d2d-2fde10fb0d56"
},
{
"id": "3c70b0cc-d9d8-4c9d-a01f-47a2d677fdd5"
}
]
}
]
}Modify a space
Modify a space in your environment.
PATCH
https://manage.kontent.ai/v2/projects/{environment_id}/spaces/{space_identifier}Request
Path parameters
environment_idrequired · string
Identifies your environment.
space_identifierrequired · string
Identifies a space by it's internal ID (eg.,
6291c693-f6e4-4a6b-ac67-5c31c32f9388) or codename (eg., codename/space_1)Body schema
Application/json
Specifies the operations to perform on the specified space.
array · min. 1 items · unique items
Request samples
Payload
TypeScript
C#
cURL
// 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',
});
client
.modifySpace()
.bySpaceCodename('my_new_space')
.withData([
{
op: 'replace',
property_name: 'codename',
value: 'new_space_codename',
},
{
op: 'replace',
property_name: 'name',
value: 'new_space_name',
},
])
.toPromise();
Response
Status (200)
The modified space object.
idstring · read-only · uuid
The space's internal ID.
namestring · 1-200 chars
The space's display name.
codenamestring · 1-210 chars
The space's codename.
web_spotlight_root_itemobject · nullable
Deprecated
Reference to the root content item used to build the navigation tree.
root_itemobject · nullable
Reference to the root content item used to build the navigation tree.
Example responses
200
400
{
"id": "6291c693-f6e4-4a6b-ac67-5c31c32f9388",
"name": "Space 1",
"codename": "space_1",
"web_spotlight_root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"root_item": {
"id": "3f367e4f-75b7-4b48-be3b-1136bbaf1f53"
},
"collections": [
{
"id": "511d4c6e-ff91-453e-9850-774867780ea3"
},
{
"id": "faa44123-a826-4d78-9d2d-2fde10fb0d56"
},
{
"id": "3c70b0cc-d9d8-4c9d-a01f-47a2d677fdd5"
}
]
}Delete a space
Delete a space from your environment.
DELETE
https://manage.kontent.ai/v2/projects/{environment_id}/spaces/{space_identifier}Request
Path parameters
environment_idrequired · string
Identifies your environment.
space_identifierrequired · string
Identifies a space by it's internal ID (eg.,
6291c693-f6e4-4a6b-ac67-5c31c32f9388) or codename (eg., codename/space_1)Request samples
TypeScript
C#
cURL
// 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
.deleteSpace()
.bySpaceCodename('my_new_space')
.toPromise();
Response
Status (204)
The specified space was deleted.
Empty response
Example responses
404
{
"request_id": "50e4b06809cbde0b",
"error_code": 121,
"message": "The requested space '{id: 6291c693-f6e4-4a6b-ac67-5c31c32f9388}' was not found."
}