CMS items

Get an item

Returns one item, looked up by itemId or by the collectionId + slug pair (provide exactly one of the two). The data object is complete and schema-shaped: every currently-defined field is present and missing optional values read as null. depth (0–3, default 0) embeds referenced items in place of their ids, one level per unit; referenced items that were deleted read as null (single reference) or are omitted from arrays (multi-reference). Set published to "true" or "false" to match only a published or only a draft item (a mismatch reads as not found). List items that reference it with cms.items.backreferences.list.

get/cms/items/find

Request

  • Base URL: https://api.cactal.ai/v1
  • URL: https://api.cactal.ai/v1/cms/items/find
  • Auth: HTTP bearer

Query parameters

itemIdstring

Item id. Provide either this or the collectionId + slug pair.

collectionIdstring

Collection to look the item up in by slug. Pair with slug.

slugstring

Item slug within the collection. Pair with collectionId.

depthinteger
'true'
OR
'false'

Response

The item, hydrated to the requested depth.

idstring required

Unique item id.

collectionIdstring required

Id of the owning collection.

slugstring required

URL-shaped identifier, unique among the collection’s active items. Lowercase letters, digits, and hyphens; max 256 characters.

publishedAtstring date-time nullable required

null while the item is a draft or scheduled; the actual publish timestamp otherwise.

publishAtstring date-time nullable required

Future publication time while the item is scheduled; null for drafts and published items.

createdAtstring date-time required

Creation timestamp.

updatedAtstring date-time required

Last-modification timestamp.

positionstring required

Fractional ordering key; the default list order sorts by this value.

dataobject required

One entry per field of the collection, keyed by field key; optional fields with no value read as null. Scalar fields use plain JSON values: date as an ISO 8601 string, color as normalized hex, option as a choice id (or array of ids when multi-select). reference values are the referenced item id at depth 0 or an embedded item object (this same item shape) at depth ≥ 1; multi_reference values are ordered arrays of the same. image and gallery values resolve to image objects carrying id, delivery url, originalUrl, srcSet, variants, dimensions, filename, mimeType, byteSize, and altText; file values resolve to { id, url, filename, mimeType, byteSize }. Unset asset fields read as null (or [] for galleries).

Changes

No recorded changes to this operation across all 1 revision of this API.