Referencia

API de lectura

Los 8 endpoints de /v1, que un sitio fuera de Cloudflare lee con un token de lectura. Cada uno responde JSON con un ETag, y 304 cuando nada cambió desde entonces; un token de preview lee la última revisión de una entrada. Un despliegue sirve lo mismo, como OpenAPI, en /v1/openapi.json.

Las descripciones son las que entrega el servidor, en inglés.

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.

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

ParámetroEnQué es
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.

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

ParámetroEnQué es
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

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

ParámetroEnQué es
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.

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

ParámetroEnQué es
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.

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

ParámetroEnQué es
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

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

ParámetroEnQué es
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.

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