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.
/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
| Parameter | In | What it is |
|---|---|---|
| collection* | path | A collection of the site, as describe_site lists it. |
| locale | query | A locale of the site, as describe_site lists it. |
| tag | query | |
| limit | query | |
| cursor | query |
/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
| Parameter | In | What it is |
|---|---|---|
| collection* | path | A collection of the site, as describe_site lists it. |
| locale* | path | A locale of the site, as describe_site lists it. |
| slug* | path | The entry's path segment: lowercase letters and digits joined by hyphens, such as edge-caching-guide. |
| formats | query | What to return of the revision: markdown, the Comark document, or html. |
| related | query | Also 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. |
| references | query | Also 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. |
| preview | query | |
| hollware-preview | header |
/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
| Parameter | In | What it is |
|---|---|---|
| collection* | path | A collection of the site, as describe_site lists it. |
| group* | path |
/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
| Parameter | In | What it is |
|---|---|---|
| collection | query | A collection of the site, as describe_site lists it. |
| locale | query | A locale of the site, as describe_site lists it. |
| limit | query | |
| cursor | query |
/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
| Parameter | In | What it is |
|---|---|---|
| path* | query | |
| preview | query |
/v1/search
Searches the published entries of the site, best match first. Full text finds the entries that hold every word of query, in their title, tags and text; semantic finds them by meaning, in any language; hybrid merges both. Narrow it to a collection or a locale. Drafts are not searched: read them with list_entries.
Answers: The published entries that match q, best first · 200, 304, 401, 403
| Parameter | In | What it is |
|---|---|---|
| q* | query | |
| collection | query | A collection of the site, as describe_site lists it. |
| locale | query | A locale of the site, as describe_site lists it. |
| limit | query | |
| mode | query | fulltext, semantic or hybrid; hybrid when not given. Semantic and hybrid need the semantic search of the deployment: without it the search is full text, and mode in the answer says so. |
| passages | query | Also answer, for each result, the passage that matched: the whole section of the entry, with its heading, and the URL of the entry. What a model reads to answer with the content and cite it (retrieval-augmented generation). |
| minScore | query | Leave out what matches by meaning less than this (0 to 1), so a question nothing answers finds nothing. Full text matches are kept. |
/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