API リファレンス
Items
Content Delivery API: GET /collections/{key}/items, GET /collections/{key}/items/{slug}
Parameters
keystring · pathrequiredfilterobject · queryBracket-notation filter conditions (up to 10 conditions combined with AND, plus 2-level OR groups via filter[any][0][field][op]=value). Shorthand filter[field]=value equals filter[field][eq]=value. 15 operators by field type: eq, ne, in, nin (up to 100 comma-separated values), gt, gte, lt, lte, contains, ncontains, match (multi-word substring match on text/rich_text, max 1 per query and 8 words), exists (true|false), has (multi_select/multi_reference), eq_slug (reference), has_slug (multi_reference). Item-level attributes slug, publishedAt, createdAt, updatedAt are also filterable. Date/datetime fields accept relative expressions: now or now[+-]<N><s|m|h|d|w|M|y> (e.g. filter[publishedAt][gte]=now-30d).
sortstring · queryComma-separated sort fields (up to 3 fields), prefix with `-` for descending (e.g. `sort=-publishedAt,title`), or bracket form `sort[field]=asc|desc`. Sortable: scalar fields and item attributes (`slug`, `publishedAt`, `createdAt`, `updatedAt`); `rich_text`, `json`, `image`, `gallery`, `file`, and `multi_*` are not sortable.
limitinteger · queryMaximum number of items to return, 1-100. Defaults to 20.
cursorstring · queryOpaque cursor from the previous page's nextCursor. Omit for the first page.
totalboolean · querytrue adds total (the number of matching items) to the response; it costs an extra count query.
fieldsstring · queryComma-separated `fieldData` field IDs to project (top-level item metadata `id`, `slug`, `publishedAt`, `updatedAt` are always returned).
expandstring · queryComma-separated `reference` or `multi_reference` field IDs (plus `primary_author`, `primary_category` on `blog`) to expand 1 layer into `item.expanded[fieldId]`. Referenced media assets are automatically included in the top-level `assets` map (trashed, missing, or private-bucket assets are filtered out).
includeDepth1 · queryReference include depth. Only 1 is accepted in v1.
formatsstring · queryComma-separated blog content formats: markdown, html, plaintext
localestring · queryLocale for item fields marked localized; for the blog, blog_categories, blog_tags and authors collections, the post, category, tag and author translations (titles, excerpts, bodies, SEO fields). Expanded references are translated too. One of the site's locales from /site (a code such as `en-US` or the URL prefix such as `en`); omit it for the primary locale. Other values, including locales that are still translating, return 400 UNSUPPORTED_LOCALE. Untranslated fields fall back to the primary locale. On multilingual sites each item carries resolvedLocale and availableLocales.
preview"1" · queryPass `preview=1` with `X-Kanorio-Preview: knr_pv_<token>` (or a server-held PAT with `collections:view`) to read unpublished draft `fieldData` (`Cache-Control: no-store`).
Response 200
dataobject[]requiredhasMorebooleanrequiredTrue when another page exists; pass nextCursor to fetch it.
nextCursorstring | nullrequiredCursor for the next page, or null on the last page.
totalintegerNumber of matching items; only present when the request sets total=true.
assetsobjectrequiredaccessobjectField-level access summary. At the top level it describes the collection policy for the current viewer (anonymous or the bearer of a Customer Access Token); per-item access may differ when the collection sets itemOverrideField, so render per item from items[].access.
access.grantedbooleanrequiredaccess.gatedstring[]requiredaccess.requiresobject | nullrequiredaccess.requires.kind"customer" | "entitlement"access.requires.featureKeystring
Errors
COLLECTION_NOT_FOUND404INVALID_QUERY400INVALID_CURSOR400UNSUPPORTED_LOCALE400QUERY_TIMEOUT503
curl -X GET "https://{site}/api/v1/collections/{key}/items"Parameters
keystring · pathrequiredslugstring · pathrequiredfieldsstring · queryexpandstring · queryformatsstring · queryComma-separated blog content formats: markdown, html, plaintext
preview"1" · queryincludeDepth1 · queryReference include depth. Only 1 is accepted in v1.
localestring · queryLocale for the item, the same as the list endpoint (system collections use the post, category, tag and author translations; expanded references are translated too). One of the site's locales from /site (a code such as `en-US` or the URL prefix such as `en`); omit it for the primary locale. Other values, including locales that are still translating, return 400 UNSUPPORTED_LOCALE. Untranslated fields fall back to the primary locale. On multilingual sites the item carries resolvedLocale and availableLocales.
Response 200
itemobjectrequiredassetsobjectrequiredaccessobjectField-level access summary. At the top level it describes the collection policy for the current viewer (anonymous or the bearer of a Customer Access Token); per-item access may differ when the collection sets itemOverrideField, so render per item from items[].access.
access.grantedbooleanrequiredaccess.gatedstring[]requiredaccess.requiresobject | nullrequiredaccess.requires.kind"customer" | "entitlement"access.requires.featureKeystring
Errors
COLLECTION_NOT_FOUND404ITEM_NOT_FOUND404UNSUPPORTED_LOCALE400
curl -X GET "https://{site}/api/v1/collections/{key}/items/{slug}"