List content types

GET https://deliver.kontent.ai/:environment_id/types

Retrieve a paginated list of content types. By default, the API returns all content types ordered alphabetically by codename.

You can customize pagination by specifying both the skip and limit query parameters.

Request Params

KeyDatatypeRequiredDescription
elementsstringDetermines a subset of the content type's elements to retrieve. The elements are specified using 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

If the specified elements don't match the elements present in the content type, the API returns the content type without any elements.

The elements filter applies to all content types within the types array. The filter doesn't apply to the content types' system properties. This means you cannot omit the system object from the response. | | skip | string | | 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. | | limit | string | | 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. |

HEADERS

KeyDatatypeRequiredDescription
X-KC-Wait-For-Loading-New-ContentstringDetermines 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. | | Accept | string | | |

RESPONSES

status: OK

{"types":[{"system":{"id":"b2c14f2c-6467-460b-a70b-bca17972a33a","name":"Article","codename":"article","last_modified":"2019-10-20T12:03:17.4685693Z"},"elements":{"multiple_choice":{"type":"multiple_choice","name":"Multiple choices","options":[{"name":"True","codename":"true"},{"name":"False","codename":"false"}]},"text":{"type":"text","name":"Text element"},"taxonomy":{"type":"taxonomy","name":"Categories taxonomy","taxonomy_group":"categories"}}}],"pagination":{"skip":20,"limit":10,"count":10,"next_page":"https://deliver.kontent.ai/\u003cenvironment_id\u003e/\u003cresource\u003e?limit=10\u0026skip=30","total_count":53111541}}