Reference

Read API

The 8 endpoints of /v1, which a site outside Cloudflare reads with a read token. Each answers JSON with an ETag, and 304 when nothing changed since; a preview token reads the latest revision of one entry. A deployment serves the same, as OpenAPI, at /v1/openapi.json.

GET

/v1/{collection}

Lists the entries of a collection, newest first, filtered by locale, tag or status. Pass the nextCursor of an answer as cursor to get the next page. Entries in the trash are left out, unless trashed asks for them.

Answers: A page of published entries · 200, 304, 401, 403

ParameterInWhat it is
collection*pathA collection of the site, as describe_site lists it.
localequeryA locale of the site, as describe_site lists it.
tagquery
limitquery
cursorquery
GET

/v1/{collection}/{locale}/{slug}

Gets an entry by collection, locale and slug, with its latest revision: the Markdown, the frontmatter, the verdict of its contracts and its last publication.

Answers: A published entry; with a valid preview token, its latest revision, uncacheable and with no ETag · 200, 304, 400, 401, 403, 404

ParameterInWhat it is
collection*pathA collection of the site, as describe_site lists it.
locale*pathA locale of the site, as describe_site lists it.
slug*pathThe entry's path segment: lowercase letters and digits joined by hyphens, such as edge-caching-guide.
formatsqueryWhat to return of the revision: markdown, the Comark document, or html.
relatedqueryAlso return the published entries closest to this one by meaning, in its collection and locale, closest first. Needs the semantic search of the deployment; empty without it.
referencesqueryAlso return the published entries that the fields of a reference rule name (an author, a series, an event), by field, in the order the field names them.
previewquery
hollware-previewheader
GET

/v1/{collection}/navigation

Answers: The published entries of the collection in the locale, grouped and ordered for a sidebar · 200, 304, 401, 403, 422

ParameterInWhat it is
collection*path
localequery
GET

/v1/{collection}/translations/{group}

Gets the entries of a translation group of a collection, one per locale. The group is the value of the field that describe_site names as translationGroupField.

Answers: The published entries of the group · 200, 304, 401, 403, 404

ParameterInWhat it is
collection*pathA collection of the site, as describe_site lists it.
group*path
GET

/v1/redirects

Lists the old paths of the site's entries that moved (move_entry) and where each goes now, newest first: what a site answers with a 301. Narrow it to a collection or a locale; pass the nextCursor of an answer as cursor for the next page.

Answers: The old paths of entries that moved, and where each goes now · 200, 304, 401, 403

ParameterInWhat it is
collectionqueryA collection of the site, as describe_site lists it.
localequeryA locale of the site, as describe_site lists it.
limitquery
cursorquery
GET

/v1/resolve

Answers: The entry a path of the site names, or where it is now when it moved (redirect) · 200, 304, 401, 403, 404

ParameterInWhat it is
path*query
previewquery
GET

/v1/site

Describes the site: its locales, and for each collection the JSON Schema of the frontmatter, the components the body may use, the contracts that writes and publishes are checked against, and the style guides. Read it before writing.

Answers: The site · 200, 304, 401, 403