Endpoints
The Content API's core endpoints read and write entries within one collection. Every route below is relative to /public/v2/projects/:uuid/collections/:slug/content and requires a bearer token (see Authentication).
Get Entries
/collections/:slug/contentList entries
Returns entries for the collection, filtered and paginated by query-string parameters - see Parameters. Requires the read ability.
Search Entries
/collections/:slug/content/searchList entries with a JSON filter body
The same listing as GET .../content, but takes its filters - including where and whereRelation, which are awkward to express as bracketed query-string params - as a JSON request body instead. Requires the read ability.
{
"where": [{ "status": "active" }],
"sort": "publishedAt:desc",
"limit": 20
}Get One Entry
/collections/:slug/content/:idFetch a single entry
Returns one entry by id. Responds with 404 if the id doesn't exist in this collection, or has been deleted. Requires the read ability.
Create an Entry
/collections/:slug/contentCreate a new entry
Body is a flat object of field name → value, for the fields defined on the collection. The new entry is created as a draft unless the collection's write rules publish it automatically. Requires the create ability.
Update an Entry
/collections/:slug/content/:idUpdate an existing entry
Body only needs the fields being changed - fields left out keep their current value. Requires the update ability.
Delete an Entry
/collections/:slug/content/:idDelete an entry
Permanently removes the entry. Requires the delete ability.
{ "message": "Record deleted." }See also