List the items of a content type

Read the published items of a content type you defined yourself, up to 100 at a time, with a CMS API key or a signed-in session.

Returns the published items of a content type you defined in the Console, such as faq or store-locations. It is the older, simpler route: it has no paging, no sorting and no language.

MethodPath
GET/v1/public/cms/:contentTypeSlug/items

:contentTypeSlug is the slug of the content type.

Who can call it

A CMS API key, or a signed-in user of the tenant. This route is never open: naming the tenant is not enough. See who can read content.

Request

curl --get 'https://api.sandbox.ovok.com/v1/public/cms/faq/items' \
  --header "x-api-key: ${OVOK_CMS_KEY}" \
  --data-urlencode 'tenant=big-health-company'
QueryDescription
tenant, projectId, apiKeyAs for listing a collection.

locale, page, limit and sort are not read on this route.

Response

The same list envelope as for a collection (docs, totalDocs, limit, totalPages, page and the paging links). Each item has:

FieldMeaning
contentTypeThe content type the item belongs to.
titleThe item's title.
slugThe item's slug, unique within your tenant.
statusAlways published here.
dataThe values of the fields you defined for the content type, as JSON, keyed by each field's key.

What can go wrong

The errors in the overview apply. An open collection route would let a name-only request through; this one answers 401 without a key or session.

Gotchas

  • At most 100 items, silently. There is no paging. If you have more, the first 100 come back, and hasNextPage can be true with no way to reach the rest. Keep each content type under 100 published items, or define more than one.
  • No language. locale is ignored. If you need localised content, use a collection with localised fields.
  • No shared content. Ovok's shared tenant is not merged in, and there is no slug fallback.
  • The slug is not checked. An unknown content type is not rejected as such: you simply get no items.
  • It is cached separately from the collection routes, with the same 60-second window.

Last updated on

On this page