Enumerate content items
GET https://deliver.kontent.ai/:environment_id/items-feed
Retrieve a dynamically paginated list of content items ordered alphabetically by codename.
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.
We recommend using this endpoint for warming up your app's cache (that is getting all content into the cache after the app starts) or for exporting the content of your project's environment.
This endpoint, unlike the List content items endpoint, guarantees to enumerate all content items in the specified environment. The 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.
Get only the items you need
To 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.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
language | string | Determines which language variant of content items to return. By default, the API returns content in the default language. |
<div class="callout callout--info">
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.</div>
|
| elements | string | | 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
Usage notes
- 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. |
|
excludeElements| string | | 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
Usage notes
- 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. |
|
order| string | | 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]|
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
X-KC-Wait-For-Loading-New-Content | string | 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-Continuation | string | | 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. |
| Accept | string | | |
RESPONSES
status: OK
{"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":"\u003cp\u003eLorem 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.\u003c/p\u003e\n\u003cobject type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n43768251_0eaa_01f6_69c2_f93047f076e1\"\u003e\u003c/object\u003e\n\u003cp\u003eDuis 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.\u003c/p\u003e"},"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":"\u003cp\u003eThe 3 most important things when writing error messages\u003c/p\u003e\n\u003col\u003e\n \u003cli\u003eDon’t abuse alerts for upselling or showing superfluous information. People will stop reading the messages that are actually important.\u003c/li\u003e\n \u003cli\u003eDon’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.\u003c/li\u003e\n \u003cli\u003eUse a friendly, non-technical, non-threatening tone of voice.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cem\u003e\u003cstrong\u003eTL;DR Write actionable error messages that laypeople can understand.*\u003c/strong\u003e\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003cem\u003e*Not sure if they do? Show them to a non-technical person and ask them to explain it back to you.\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eRead the full story on \u003c/em\u003e\u003ca 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\"\u003e\u003cem\u003eMedium\u003c/em\u003e\u003c/a\u003e\u003cem\u003e.\u003c/em\u003e\u003c/p\u003e\n\u003cobject type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n78ee300e_7a58_0117_819e_529b2294067b\"\u003e\u003c/object\u003e"},"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":"\u003cfigure data-asset-id=\"04e4957f-08ed-4329-9c7a-0d7b7c6f3590\" data-image-id=\"04e4957f-08ed-4329-9c7a-0d7b7c6f3590\"\u003e\u003cimg 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\"\u003e\u003c/figure\u003e\n\u003cp\u003eQuisque 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.\u003c/p\u003e\n\u003cobject type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n499599bf_6bda_019e_d2f7_debd4589f3b8\"\u003e\u003c/object\u003e\n\u003cp\u003eNullam 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.\u003c/p\u003e\n\u003cp\u003eNulla 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 \u003ca data-item-id=\"29b82988-fb9e-4327-a34b-b568cfaa39e9\" href=\"\"\u003equis\u003c/a\u003e pellentesque erat.\u003c/p\u003e"}}}],"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 \u003ch1\u003eHello, world!\u003c/h1\u003e,\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"}}}}}