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
Reference to a specific object in the environment.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
Show child attributes
collections[]array · unique items
An array of references to collections that belong to the space.
Show child attributes
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"
},
"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
Reference to a specific object in the environment.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
Show child attributes
collections[]array · unique items
An array of references to collections that belong to the space.
Show child attributes
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
Reference to a specific object in the environment.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
Show child attributes
collections[]array · unique items
An array of references to collections that belong to the space.
Show child attributes
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"
},
"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
Reference to a specific object in the environment.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
Show child attributes
collections[]array · unique items
An array of references to collections that belong to the space.
Show child attributes
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"
},
"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
Hide child attributes
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
Reference to a specific object in the environment.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
Hide child attributes
idstring · uuid
The referenced object's internal ID.
collections[]array · unique items
An array of references to collections that belong to the space.
Hide child attributes
idstring · uuid
The referenced object's internal ID.
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"
},
"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
Hide child attributes
oprequired · string
The operation to perform.
property_namerequired · string
The space property that you want to modify, specified by its name.
valuerequired · nestedSchema
The value to insert into the specified property. The format of the
value property depends on the value of the property_name property.Any of:
String
Reference object
Array of References
String
stringstring
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
Reference to a specific object in the environment.
The API uses internal IDs for referencing objects. This means that the reference objects in the API responses will always use internal IDs.
Show child attributes
collections[]array · unique items
An array of references to collections that belong to the space.
Show child attributes
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"
},
"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."
}