Content items
Content item object
The content item with metadata and individual elements.
systemrequired · object
The content item's system properties.
Show child attributes
<element_codename>object
The item's elements with values for the specific language. The order of the element objects might not match the content element order in the UI.
Show child attributes
JSON
{
"system": {
"id": "335d17ac-b6ba-4c6a-ae31-23c1193215cb",
"collection": "default",
"name": "My article",
"codename": "my_article",
"language": "en-US",
"type": "article",
"sitemap_locations": [],
"last_modified": "2019-03-27T13:21:11.38Z",
"workflow": "default",
"workflow_step": "published"
},
"<element_codename>": {
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "writing-good-error-messages"
}
}
}List content items
Retrieve a list of content items from the specified environment. By default, the API returns an unfiltered paginated list of content items in the default language, ordered alphabetically by codename. The response size is limited to 2000 items.The
Get only the items you needTo retrieve specific content items, use the filtering parameters in your requests. For example, you can request items tagged with a taxonomy term, items of a specific type, or items modified in the past three days.
modular_content object property will contain both components and linked items in the API response. See Linked content and components for more details.
If you need to export all content items, we recommend you enumerate content items.
GET
https://deliver.kontent.ai/{environment_id}/itemsGET
https://preview-deliver.kontent.ai/{environment_id}/itemsRequest
Path parameters
environment_idrequired · string
Identifies your environment.
Query parameters
languagestring
Determines which language variant of content items to return. By default, the API returns content in the default language.
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.
elementsstring
Determines which content elements to retrieve. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
- Retrieve a single element –
elements=title - Retrieve multiple elements –
elements=title,summary,related_articles
- The filter applies to all content items within the response. That is both the
itemsarray andmodular_contentobject property. - If the specified elements don't match the elements present in the content items, the API returns the content items without any elements.
- The filter doesn't apply to content components. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
excludeElementsstring
Determines which content elements to exclude. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
- Exclude a single element –
excludeElements=title - Exclude multiple elements –
excludeElements=title,summary,related_articles
- The filter applies to all content items within the response. That is both the
itemsarray andmodular_contentobject property. - If the specified elements don't match the elements present in the content items, the API response returns all elements of the content items without any exclusion.
- The filter doesn't apply to content components. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
orderstring
Determines the order of the returned content items. By default, the content items are sorted alphabetically by their codenames from A to Z.To sort the items in a specific order, use the
asc and desc modifiers in square brackets. For example, to sort by the value of the Title element in ascending order, use order=elements.title[asc], or to sort by content item codenames in descending order, use order=system.codename[desc].
You can sort by any content item properties in the items array of the API response.
Examples
- Sort by the date of last modification from oldest to newest –
order=system.last_modified[desc] - Sort by a content item name from A to Z –
order=system.name[asc] - Sort by an element value from A to Z –
order=elements.<element_codename>[asc]
depthnumber · int32
Determines the nesting level for linked content items that the API returns. By default, only the first level of linked items is returned, which is the same as setting
Components are always present in response. See Linked content and components for more details.
depth=1.- To include more than one level of linked items in the response, set
depthto2or more. - To exclude all linked items from the response, set
depthto0.
skipnumber · int32
Sets the number of objects to skip when requesting a list of objects. The
skip parameter must be combined with the limit parameter to work. If skip is not specified, the API returns the first page of results.You can combine the limit and skip parameters to specify page size and page number. For example, using limit=10&skip=10 sets the page size to 10 and gets the second page of results.limitnumber · int32
Sets the number of objects to retrieve in a single request. If the
limit parameter is not specified, the API returns all requested objects by default.If limit is lower than the total number of objects matching your query, the next_page property in the pagination object of the API response will contain a URL to the next page of results.
The limit parameter affects only the number of items in the items property. It doesn't reduce the number of linked items in the modular_content property so you may hit the response size limit unexpectedly. You can set depth=0 to avoid that.includeTotalCountboolean
Adds the information about the total number of content items matching your query. Only the content filtering parameters affect the resulting number. Other parameters in your query, such as
limit, skip, or order, don't have an effect on it.The number doesn't include linked items returned as part of the modular_content property. For the total number of items returned within the response, see the X-Request-Charge header.
When set to true, the pagination object returned in the API response contains an additional total_count property.Header parameters
X-KC-Wait-For-Loading-New-Contentboolean
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
Request samples
TypeScript
C#
Java
PHP
Ruby
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { createDeliveryClient } from '@kontent-ai/delivery-sdk';
import { Article } from './models/Article';
const deliveryClient = createDeliveryClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
});
const response = await deliveryClient
.items<Article>()
.type('article')
.limitParameter(3)
.toPromise();
Response
Status (200)
A paginated list of content items matching the specified criteria.
items[]required · array · unique items
A list of content items.
Show child attributes
<ItemOrComponentCodename>object
A dictionary of components and linked items.Note: The items and components are not in any particular order.
Show child attributes
paginationrequired · object
Information about the current page of results.
Show child attributes
Example responses
200
400
{
"items": [
{
"system": {
"id": "4d4dc14d-8c7c-471f-b797-c6694c604964",
"name": "About us",
"codename": "about_us",
"language": "en-US",
"type": "article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-17T07:22:51.6711216Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "Great news about us"
},
"body_copy": {
"type": "rich_text",
"name": "Body",
"images": {},
"links": {},
"modular_content": [
"n43768251_0eaa_01f6_69c2_f93047f076e1"
],
"value": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n43768251_0eaa_01f6_69c2_f93047f076e1\"></object>"
},
"related_articles": {
"type": "modular_content",
"name": "Related articles",
"value": [
"my_article"
]
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "great-news-about-us"
}
}
},
{
"system": {
"id": "0afdd600-d6c5-4ac4-bb6b-d2847ca779fe",
"name": "About us",
"codename": "about_us_0afdd60",
"language": "en-US",
"type": "navigation_item",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-04T15:14:48.0057835Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "About us"
},
"url": {
"type": "url_slug",
"name": "URL",
"value": "about-us"
},
"subitems": {
"type": "modular_content",
"name": "Subitems",
"value": [
"about_us"
]
}
}
}
],
"modular_content": {
"about_us": {
"system": {
"id": "4d4dc14d-8c7c-471f-b797-c6694c604964",
"name": "About us",
"codename": "about_us",
"language": "en-US",
"type": "article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-17T07:22:51.6711216Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "Great news about us"
},
"body_copy": {
"type": "rich_text",
"name": "Body",
"images": {},
"links": {},
"modular_content": [
"n43768251_0eaa_01f6_69c2_f93047f076e1"
],
"value": "<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n43768251_0eaa_01f6_69c2_f93047f076e1\"></object>"
},
"related_articles": {
"type": "modular_content",
"name": "Related articles",
"value": [
"my_article"
]
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "great-news-about-us"
}
}
},
"jenny_brown": {
"system": {
"id": "59838cfd-ba15-4607-8e6a-d91931fc7ce6",
"name": "Jenny Brown",
"codename": "jenny_brown",
"language": "en-US",
"type": "author",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-05T11:33:54.5271987Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"name": {
"type": "text",
"name": "Name",
"value": "Jenny Brown"
},
"bio": {
"type": "rich_text",
"name": "Bio",
"images": {},
"links": {},
"modular_content": [],
"value": "<p>Jenny is here for all things wildlife and, newly, climate changes. Check her out.</p>"
}
}
},
"my_article": {
"system": {
"id": "29b82988-fb9e-4327-a34b-b568cfaa39e9",
"name": "My article",
"codename": "my_article",
"language": "en-US",
"type": "article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-03T13:58:21.5779868Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "My article"
},
"body_copy": {
"type": "rich_text",
"name": "Body",
"images": {},
"links": {},
"modular_content": [],
"value": "<p>Lorem ipsum dolor sit amet.</p>"
},
"related_articles": {
"type": "modular_content",
"name": "Related articles",
"value": [
"about_us"
]
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jean_morris"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "my-article"
}
}
},
"n43768251_0eaa_01f6_69c2_f93047f076e1": {
"system": {
"id": "43768251-0eaa-01f6-69c2-f93047f076e1",
"name": "43768251-0eaa-01f6-69c2-f93047f076e1",
"codename": "n43768251_0eaa_01f6_69c2_f93047f076e1",
"language": "en-US",
"type": "tweet",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-17T07:22:51.6711216Z"
},
"elements": {
"theme": {
"type": "multiple_choice",
"name": "Theme",
"value": [
{
"name": "Light",
"codename": "light"
}
]
},
"tweet_link": {
"type": "text",
"name": "Tweet link",
"value": "https://twitter.com/Kontent_ai/status/1222987911940972545"
},
"display_options": {
"type": "multiple_choice",
"name": "Display options",
"value": [
{
"name": "Hide thread",
"codename": "hide_thread"
}
]
}
}
}
},
"pagination": {
"skip": 0,
"limit": 3,
"count": 3,
"next_page": "https://deliver.kontent.ai/8d20758c-d74c-4f59-ae04-ee928c0816b7/items/?limit=3&skip=3"
}
}Retrieve a content item
Retrieve a content item by its codename.The response size is limited to 2000 items.
GET
https://deliver.kontent.ai/{environment_id}/items/{item_codename}GET
https://preview-deliver.kontent.ai/{environment_id}/items/{item_codename}Request
Path parameters
environment_idrequired · string
Identifies your environment.
item_codenamerequired · string
Identifies the content item by codename.
Query parameters
languagestring
Determines which language variant of content items to return. By default, the API returns content in the default language.
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.
elementsstring
Determines which content elements to retrieve. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
- Retrieve a single element –
elements=title - Retrieve multiple elements –
elements=title,summary,related_articles
- The filter applies to all content items within the response. That is both the
itemsarray andmodular_contentobject property. - If the specified elements don't match the elements present in the content items, the API returns the content items without any elements.
- The filter doesn't apply to content components. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
excludeElementsstring
Determines which content elements to exclude. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
- Exclude a single element –
excludeElements=title - Exclude multiple elements –
excludeElements=title,summary,related_articles
- The filter applies to all content items within the response. That is both the
itemsarray andmodular_contentobject property. - If the specified elements don't match the elements present in the content items, the API response returns all elements of the content items without any exclusion.
- The filter doesn't apply to content components. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
depthnumber · int32
Determines the nesting level for linked content items that the API returns. By default, only the first level of linked items is returned, which is the same as setting
Components are always present in response. See Linked content and components for more details.
depth=1.- To include more than one level of linked items in the response, set
depthto2or more. - To exclude all linked items from the response, set
depthto0.
Header parameters
X-KC-Wait-For-Loading-New-Contentboolean
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
Request samples
TypeScript
C#
Java
PHP
Ruby
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import {
createDeliveryClient,
IContentItem,
Elements,
} from '@kontent-ai/delivery-sdk';
const deliveryClient = createDeliveryClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
});
export type Article = IContentItem<{
title: Elements.TextElement;
summary: Elements.RichTextElement;
post_date: Elements.DateTimeElement;
teaser_image: Elements.AssetsElement;
related_articles: Article[];
}>;
// Tip: Create strongly typed models according to https://kontent.ai/learn/strongly-typed-models
const response = await deliveryClient.item<Article>('my_article').toPromise();
Response
Status (200)
A single content item object.
itemrequired · object
The content item with metadata and individual elements.
Show child attributes
<content_item_codename>object
The collection of related Content item objects (including component objects).
Show child attributes
Example responses
200
404
{
"item": {
"system": {
"id": "7b11fe14-6282-4daa-b901-e59e231cd93c",
"name": "How to write error messages",
"codename": "how_to_error_message",
"language": "en-US",
"type": "article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-12-16T15:08:53.2391808Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "Writing good error messages"
},
"body_copy": {
"type": "rich_text",
"name": "Body",
"images": {},
"links": {},
"modular_content": [
"n78ee300e_7a58_0117_819e_529b2294067b"
],
"value": "<p>The 3 most important things when writing error messages</p>\n<ol>\n <li>Don’t abuse alerts for upselling or showing superfluous information. People will stop reading the messages that are actually important.</li>\n <li>Don’t just assume people know about the context of a message. They might toggle between apps and see your message days after it happened. Always include enough information for users to make sense of it.</li>\n <li>Use a friendly, non-technical, non-threatening tone of voice.</li>\n</ol>\n<p><em><strong>TL;DR Write actionable error messages that laypeople can understand.*</strong></em></p>\n<p><em>*Not sure if they do? Show them to a non-technical person and ask them to explain it back to you.</em></p>\n<p><em>Read the full story on </em><a href=\"https://medium.com/@thomasfuchs/how-to-write-an-error-message-883718173322\" data-new-window=\"true\" title=\"How to write a great error message\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Medium</em></a><em>.</em></p>\n<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n78ee300e_7a58_0117_819e_529b2294067b\"></object>"
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "writing-good-error-messages"
}
}
},
"modular_content": {
"jenny_brown": {
"system": {
"id": "59838cfd-ba15-4607-8e6a-d91931fc7ce6",
"name": "Jenny Brown",
"codename": "jenny_brown",
"language": "en-US",
"type": "author",
"sitemap_locations": [],
"last_modified": "2020-02-05T11:33:54.5271987Z",
"collection": "default",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"name": {
"type": "text",
"name": "Name",
"value": "Jenny Brown"
},
"bio": {
"type": "rich_text",
"name": "Bio",
"images": {},
"links": {},
"modular_content": [],
"value": "<p>Jenny is here for all things wildlife and, newly, climate changes.</p>"
}
}
},
"n78ee300e_7a58_0117_819e_529b2294067b": {
"system": {
"id": "78ee300e-7a58-0117-819e-529b2294067b",
"name": "78ee300e-7a58-0117-819e-529b2294067b",
"codename": "n78ee300e_7a58_0117_819e_529b2294067b",
"language": "en-US",
"type": "blockquote",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-12-16T15:08:53.2391808Z"
},
"elements": {
"quote": {
"type": "text",
"name": "Quote",
"value": "Don't quote me on this."
},
"source": {
"type": "text",
"name": "Source",
"value": "Jeff Loomis"
}
}
}
}
}Enumerate content items
Retrieve a dynamically paginated list of content items ordered alphabetically by codename.We recommend using this endpoint for scenarios such as:
Get only the items you needTo retrieve specific content items, use the filtering parameters in your requests. For example, you can request items tagged with a taxonomy term, items of a specific type, or items modified in the past three days.
Paging
If the response comes with the
- Warming up your app's cache, that is getting all content into the cache after the app starts.
- Exporting the content of your project's environment.
modular_content object property will contain only components used in rich text elements in the API response. See Linked content and components for more details.
X-Continuation header, it means that there are more pages to retrieve. To get the next page of results, send the X-Continuation header with your request as you received it.GET
https://deliver.kontent.ai/{environment_id}/items-feedGET
https://preview-deliver.kontent.ai/{environment_id}/items-feedRequest
Path parameters
environment_idrequired · string
Identifies your environment.
Query parameters
languagestring
Determines which language variant of content items to return. By default, the API returns content in the default language.
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.
elementsstring
Determines which content elements to retrieve. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
- Retrieve a single element –
elements=title - Retrieve multiple elements –
elements=title,summary,related_articles
- The filter applies to all content items within the response. That is both the
itemsarray andmodular_contentobject property. - If the specified elements don't match the elements present in the content items, the API returns the content items without any elements.
- The filter doesn't apply to content components. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
excludeElementsstring
Determines which content elements to exclude. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
- Exclude a single element –
excludeElements=title - Exclude multiple elements –
excludeElements=title,summary,related_articles
- The filter applies to all content items within the response. That is both the
itemsarray andmodular_contentobject property. - If the specified elements don't match the elements present in the content items, the API response returns all elements of the content items without any exclusion.
- The filter doesn't apply to content components. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
orderstring
Determines the order of the returned content items. By default, the content items are sorted alphabetically by their codenames from A to Z.To sort the items in a specific order, use the
asc and desc modifiers in square brackets. For example, to sort by the value of the Title element in ascending order, use order=elements.title[asc], or to sort by content item codenames in descending order, use order=system.codename[desc].
You can sort by any content item properties in the items array of the API response.
Examples
- Sort by the date of last modification from oldest to newest –
order=system.last_modified[desc] - Sort by a content item name from A to Z –
order=system.name[asc] - Sort by an element value from A to Z –
order=elements.<element_codename>[asc]
Header parameters
X-KC-Wait-For-Loading-New-Contentboolean
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
X-Continuationstring
Determines the next page of results to retrieve. By default, when the header is not set, the API returns the first page of results.If there are more items to enumerate, the response will come with the
X-Continuation header. To get the next page of results, use the X-Continuation header from the response in your request.Request samples
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { createDeliveryClient } from '@kontent-ai/delivery-sdk';
const deliveryClient = createDeliveryClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
});
// Gets a feed of all articles in the project
const response = await deliveryClient
.itemsFeed()
.type('article')
.toAllPromise();
Response
Status (200)
A dynamically paginated feed of content items and components.
items[]required · array · unique items
A list of content items
Show child attributes
<ComponentCodename>object
A list of components used in rich text elements. See Linked content and components for more details.
Show child attributes
Example responses
200
{
"items": [
{
"system": {
"id": "4d4dc14d-8c7c-471f-b797-c6694c604964",
"name": "About us",
"codename": "about_us",
"language": "en-US",
"type": "article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-17T07:22:51.6711216Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "Great news about us"
},
"body_copy": {
"type": "rich_text",
"name": "Body",
"images": {},
"links": {},
"modular_content": [
"n43768251_0eaa_01f6_69c2_f93047f076e1"
],
"value": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>\n<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n43768251_0eaa_01f6_69c2_f93047f076e1\"></object>\n<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "great-news-about-us"
}
}
},
{
"system": {
"id": "7b11fe14-6282-4daa-b901-e59e231cd93c",
"name": "How to write error messages",
"codename": "how_to_error_message",
"language": "en-US",
"type": "article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-12-16T15:08:53.2391808Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "Writing good error messages"
},
"body_copy": {
"type": "rich_text",
"name": "Body",
"images": {},
"links": {},
"modular_content": [
"n78ee300e_7a58_0117_819e_529b2294067b"
],
"value": "<p>The 3 most important things when writing error messages</p>\n<ol>\n <li>Don’t abuse alerts for upselling or showing superfluous information. People will stop reading the messages that are actually important.</li>\n <li>Don’t just assume people know about the context of a message. They might toggle between apps and see your message days after it happened. Always include enough information for users to make sense of it.</li>\n <li>Use a friendly, non-technical, non-threatening tone of voice.</li>\n</ol>\n<p><em><strong>TL;DR Write actionable error messages that laypeople can understand.*</strong></em></p>\n<p><em>*Not sure if they do? Show them to a non-technical person and ask them to explain it back to you.</em></p>\n<p><em>Read the full story on </em><a href=\"https://medium.com/@thomasfuchs/how-to-write-an-error-message-883718173322\" data-new-window=\"true\" title=\"How to write a great error message\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Medium</em></a><em>.</em></p>\n<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n78ee300e_7a58_0117_819e_529b2294067b\"></object>"
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"url": {
"type": "url_slug",
"name": "URL pattern",
"value": "writing-good-error-messages"
}
}
},
{
"system": {
"id": "335d17ac-b6ba-4c6a-ae31-23c1193215cb",
"name": "Simple article",
"codename": "simple_article",
"language": "en-US",
"type": "simple_article",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-06T10:08:58.1048397Z",
"workflow": "default",
"workflow_step": "published"
},
"elements": {
"title": {
"type": "text",
"name": "Title",
"value": "My simple article"
},
"author": {
"type": "modular_content",
"name": "Author",
"value": [
"jenny_brown"
]
},
"body": {
"type": "rich_text",
"name": "Body",
"images": {
"04e4957f-08ed-4329-9c7a-0d7b7c6f3590": {
"image_id": "04e4957f-08ed-4329-9c7a-0d7b7c6f3590",
"description": "Person sitting on a wooden pier",
"url": "https://assets-us-01.kc-usercontent.com:443/8d20758c-d74c-4f59-ae04-ee928c0816b7/6e38c039-ad00-47f3-a584-26252827655a/daylight.jpg",
"width": 4000,
"height": 2525
}
},
"links": {
"29b82988-fb9e-4327-a34b-b568cfaa39e9": {
"codename": "my_article",
"type": "article",
"url_slug": "my-article"
}
},
"modular_content": [
"n499599bf_6bda_019e_d2f7_debd4589f3b8"
],
"value": "<figure data-asset-id=\"04e4957f-08ed-4329-9c7a-0d7b7c6f3590\" data-image-id=\"04e4957f-08ed-4329-9c7a-0d7b7c6f3590\"><img src=\"https://assets-us-01.kc-usercontent.com:443/8d20758c-d74c-4f59-ae04-ee928c0816b7/6e38c039-ad00-47f3-a584-26252827655a/daylight.jpg\" data-asset-id=\"04e4957f-08ed-4329-9c7a-0d7b7c6f3590\" data-image-id=\"04e4957f-08ed-4329-9c7a-0d7b7c6f3590\" alt=\"Person sitting on a wooden pier\"></figure>\n<p>Quisque erat nisl, elementum ac consectetur eu, vulputate id metus. Cras placerat odio est, eu elementum eros pretium id. Donec a ornare dui. Pellentesque porta sed lorem eu accumsan. Pellentesque at dui ut urna gravida volutpat finibus sit amet leo. Duis et tempus nulla.</p>\n<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n499599bf_6bda_019e_d2f7_debd4589f3b8\"></object>\n<p>Nullam odio ante, blandit ut posuere eu, eleifend vitae dui. Mauris sagittis, tortor et tempor eleifend, enim libero tempus velit, non hendrerit lacus sem eu lorem. Nulla cursus eu ante nec pulvinar.</p>\n<p>Nulla in facilisis tortor, quis pretium tortor. Vivamus quis laoreet nisi, non egestas massa. Maecenas hendrerit massa leo. Maecenas convallis dui vitae lorem suscipit efficitur. Maecenas vel dignissim erat, fringilla luctus lorem. Vivamus hendrerit ante et accumsan fringilla. Nullam <a data-item-id=\"29b82988-fb9e-4327-a34b-b568cfaa39e9\" href=\"\">quis</a> pellentesque erat.</p>"
}
}
}
],
"modular_content": {
"n43768251_0eaa_01f6_69c2_f93047f076e1": {
"system": {
"id": "43768251-0eaa-01f6-69c2-f93047f076e1",
"name": "43768251-0eaa-01f6-69c2-f93047f076e1",
"codename": "n43768251_0eaa_01f6_69c2_f93047f076e1",
"language": "en-US",
"type": "tweet",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-17T07:22:51.6711216Z"
},
"elements": {
"theme": {
"type": "multiple_choice",
"name": "Theme",
"value": [
{
"name": "Light",
"codename": "light"
}
]
},
"tweet_link": {
"type": "text",
"name": "Tweet link",
"value": "https://twitter.com/KenticoKontent/status/1222987911940972545"
},
"display_options": {
"type": "multiple_choice",
"name": "Display options",
"value": [
{
"name": "Hide thread",
"codename": "hide_thread"
}
]
}
}
},
"n499599bf_6bda_019e_d2f7_debd4589f3b8": {
"system": {
"id": "499599bf-6bda-019e-d2f7-debd4589f3b8",
"name": "499599bf-6bda-019e-d2f7-debd4589f3b8",
"codename": "n499599bf_6bda_019e_d2f7_debd4589f3b8",
"language": "en-US",
"type": "code_sample",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-02-06T10:08:58.1048397Z"
},
"elements": {
"code": {
"type": "text",
"name": "Code",
"value": "ReactDOM.render(\n <h1>Hello, world!</h1>,\n document.getElementById('root')\n);"
},
"programming_language": {
"type": "multiple_choice",
"name": "Programming language",
"value": [
{
"name": "React",
"codename": "react"
}
]
}
}
},
"n78ee300e_7a58_0117_819e_529b2294067b": {
"system": {
"id": "78ee300e-7a58-0117-819e-529b2294067b",
"name": "78ee300e-7a58-0117-819e-529b2294067b",
"codename": "n78ee300e_7a58_0117_819e_529b2294067b",
"language": "en-US",
"type": "blockquote",
"collection": "default",
"sitemap_locations": [],
"last_modified": "2020-12-16T15:08:53.2391808Z"
},
"elements": {
"quote": {
"type": "text",
"name": "Quote",
"value": "Don't quote me on this."
},
"source": {
"type": "text",
"name": "Source",
"value": "Jeff Loomis"
}
}
}
}
}List items that reference an asset
Returns a list of content items that contain references to a specific asset.What is a used asset?
For a content item to be included in the Used in list of a specific asset, at least one of the following must occur:
- The asset is inserted in a rich text element of another content item.
- The asset is hyperlinked in a rich text element of another content item.
- The asset is linked in an asset element of another content item.
system properties: type, collection, workflow, workflow_step, and language. For example, if you're interested only in items referencing the specified asset within a specific collection, you can filter by the system.collection.
Localization
By default, the endpoint returns content items in the default language. If you want to check an asset's usage across multiple languages, you can specify the languages using the system.language parameter, for example system.language[in]=english,spanish.
The endpoint ignores language fallbacks.
Paging
If the response comes with the X-Continuation header, it means that there are more pages to retrieve. To get the next page of results, send the X-Continuation header with your request as you received it.GET
https://deliver.kontent.ai/{environment_id}/assets/{asset_codename}/used-inGET
https://preview-deliver.kontent.ai/{environment_id}/assets/{asset_codename}/used-inRequest
Path parameters
environment_idrequired · string
Identifies your environment.
asset_codenamerequired · string
Identifies the asset by codename.
Header parameters
X-Continuationstring
Determines the next page of results to retrieve. By default, when the header is not set, the API returns the first page of results.If there are more items to enumerate, the response will come with the
X-Continuation header. To get the next page of results, use the X-Continuation header from the response in your request.X-KC-Wait-For-Loading-New-Contentboolean
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
Request samples
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { createDeliveryClient } from '@kontent-ai/delivery-sdk';
const deliveryClient = createDeliveryClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
});
// Gets feed of all strongly typed parent content items of type article for asset 'my_asset'
const response = await deliveryClient
.assetUsedIn('my_asset')
.type('article')
.toAllPromise();
Response
Status (200)
Content items that reference the specified content item.
items[]required · array · max. 100 items
The content items that reference the specified item.
Hide child attributes
idrequired · string · uuid
The content item's internal ID.
collectionstring · nullable
The content item's collection codename. For projects without collections enabled, the value is
default.namerequired · string
The content item's display name.
codenamerequired · string
The content item's codename. By default, generated from the item's display name.
languagestring · nullable
The codename of the language that the content is in.For details on retrieving content in different languages, see Getting localized content.
typestring · nullable
The codename of the item's type.
last_modifiedrequired · string · date-time
ISO-8601
formatted date and time of the last change to user-content of the content item.
Moving content items through workflow doesn't affect the
last_modified value.workflowstring · nullable
The codename of the content item's current workflow. By default, generated from the workflow's display name.This property is not present for components.
workflow_stepstring · nullable
The codename of the content item's current workflow step. By default, generated from the workflow step's display name.This property is not present for components.
Example responses
200
{
"items": [
{
"system": {
"id": "0240698e-8273-4066-a90f-40658db1d578",
"name": "Edit links",
"codename": "set_up_editing_from_preview",
"language": "default",
"type": "article",
"collection": "default",
"workflow": "reviewed_content",
"workflow_step": "published",
"last_modified": "2025-02-14T08:28:36.0826687Z"
}
},
{
"system": {
"id": "0e1a1ace-7ac5-4c96-88a2-3bbcf62f9a58",
"name": "Schedule unpublish",
"codename": "scheduling_content_unpublishing",
"language": "default",
"type": "article",
"collection": "default",
"workflow": "reviewed_content",
"workflow_step": "published",
"last_modified": "2024-09-27T15:39:55.257434Z"
}
}
]
}List items that reference an item
Returns a list of content items that contain references to a specific content item.What is a used content item?
For an item to be included in the Used in list of a specific content item, at least one of the following must occur:
- The content item is inserted in a rich text element of another content item.
- The content item is hyperlinked in a rich text element of another content item.
- The content item is linked in a linked items element of another content item.
- The content item links to itself within a rich text or linked items element.
system properties: type, collection, workflow, workflow_step, and language. For example, if you're interested only in items referencing the specified content item within a specific collection, you can filter by the system.collection.
Localization
By default, the endpoint returns content items in the default language. If you want to check an item's usage across multiple languages, you can specify the languages using the system.language parameter, for example system.language[in]=english,spanish.
The endpoint ignores language fallbacks.
Paging
If the response comes with the X-Continuation header, it means that there are more pages to retrieve. To get the next page of results, send the X-Continuation header with your request as you received it.GET
https://deliver.kontent.ai/{environment_id}/items/{item_codename}/used-inGET
https://preview-deliver.kontent.ai/{environment_id}/items/{item_codename}/used-inRequest
Path parameters
environment_idrequired · string
Identifies your environment.
item_codenamerequired · string
Identifies the content item by codename.
Header parameters
X-Continuationstring
Determines the next page of results to retrieve. By default, when the header is not set, the API returns the first page of results.If there are more items to enumerate, the response will come with the
X-Continuation header. To get the next page of results, use the X-Continuation header from the response in your request.X-KC-Wait-For-Loading-New-Contentboolean
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
Request samples
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { createDeliveryClient } from '@kontent-ai/delivery-sdk';
const deliveryClient = createDeliveryClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
});
// Gets feed of all strongly typed parent content items of type article for item 'my_article'
const response = await deliveryClient
.itemUsedIn('my_article')
.type('article')
.toAllPromise();
Response
Status (200)
Content items that reference the specified content item.
items[]required · array · max. 100 items
The content items that reference the specified item.
Hide child attributes
idrequired · string · uuid
The content item's internal ID.
collectionstring · nullable
The content item's collection codename. For projects without collections enabled, the value is
default.namerequired · string
The content item's display name.
codenamerequired · string
The content item's codename. By default, generated from the item's display name.
languagestring · nullable
The codename of the language that the content is in.For details on retrieving content in different languages, see Getting localized content.
typestring · nullable
The codename of the item's type.
last_modifiedrequired · string · date-time
ISO-8601
formatted date and time of the last change to user-content of the content item.
Moving content items through workflow doesn't affect the
last_modified value.workflowstring · nullable
The codename of the content item's current workflow. By default, generated from the workflow's display name.This property is not present for components.
workflow_stepstring · nullable
The codename of the content item's current workflow step. By default, generated from the workflow step's display name.This property is not present for components.
Example responses
200
{
"items": [
{
"system": {
"id": "0240698e-8273-4066-a90f-40658db1d578",
"name": "Edit links",
"codename": "set_up_editing_from_preview",
"language": "default",
"type": "article",
"collection": "default",
"workflow": "reviewed_content",
"workflow_step": "published",
"last_modified": "2025-02-14T08:28:36.0826687Z"
}
},
{
"system": {
"id": "0e1a1ace-7ac5-4c96-88a2-3bbcf62f9a58",
"name": "Schedule unpublish",
"codename": "scheduling_content_unpublishing",
"language": "default",
"type": "article",
"collection": "default",
"workflow": "reviewed_content",
"workflow_step": "published",
"last_modified": "2024-09-27T15:39:55.257434Z"
}
}
]
}