Who this is for. All three API readers: the headless developer reading content, the JavaScript developer on a server-rendered site, and the integrations engineer writing to it. This unit is about building and reading requests; the API reference lists every endpoint, and its Authentication page covers credentials.
The endpoint layout
Every module answers on a prefix under /cdna-api/, and the prefix is the module's name in lower case with hyphens between words: Pages is /cdna-api/pages, CustomEntities is /cdna-api/custom-entities, ChatChannels is /cdna-api/chat-channels. Guessing works for every module except these:
| Module or call | Prefix |
|---|---|
| Carts | /cdna-api/cart (singular) |
| Checkouts | /cdna-api/checkout (singular) |
| Jobs (the Orchestration module, formerly Hooks) | /cdna-api/hooks, and web events at /cdna-api/webhook/<slug> |
| GraphQL | /cdna-api/graphql |
| Session sign-in and out | /cdna-api/login, /cdna-api/logout |
| Account calls | /cdna-api/register, /cdna-api/forgot-password, /cdna-api/reset-password, /cdna-api/keep-alive |
The module prefix alone is not an endpoint. /cdna-api/pages answers 404; the list is /cdna-api/pages/pages.
The standard set every entity gets
Inside a module, each entity type has a singular path for one record and a plural path for the list. The same generic controllers serve every module, so once you have seen one entity you can predict the rest. Pages, in full:
| Action | Request |
|---|---|
| List | GET /cdna-api/pages/pages |
| Show one | GET /cdna-api/pages/page/72, or by its path, GET /cdna-api/pages/page/developer-docs |
| Add | POST /cdna-api/pages/page |
| Edit | PUT /cdna-api/pages/page/72 |
| Delete | DELETE /cdna-api/pages/page/72 |
| Duplicate | POST /cdna-api/pages/duplicate-page/72 |
The same shape elsewhere: /cdna-api/blogs/blogs and /cdna-api/blogs/blog/5; /cdna-api/common/tags; /cdna-api/users/groups. Three variations follow a rule too:
- Records that belong to a parent are listed under it: a blog's posts at
/cdna-api/blogs/blog/5/posts, a menu's elements at/cdna-api/menus/elements/3, a form's submissions at/cdna-api/forms/submissions/11. - Custom entity records use the type's identifier: the plural for the list,
/cdna-api/custom-entities/events, and the singular for one record,/cdna-api/custom-entities/event/12. Asking for one record with the plural identifier answers 404. - Helpers sit beside the set: a slug check (
POST /cdna-api/pages/pages/check-slug), a move (PUT /cdna-api/pages/pages/move/72), bulk changes on a few types. The reference lists them under each module.
Revision actions are per type rather than universal. Custom entity records, forms and files have routes of their own to make a revision live; a page's revisions are managed by editing the page. Making a revision live has the details.
The rest of this unit
- Filters, ordering and paging: narrowing a list, and confirming a filter took effect.
- Shaping the response with properties: the field selector, aliases, nesting and getters.
- Query string or request body: where each parameter goes, and the long selector in a GET body.
- Responses and errors: the envelope, the status codes, and validation errors mapped back to fields.
- A relation as an id or an object: what each payload form does to the related record.
- Confirming a request did what you asked: the checks to build into a client.
- The generated documentation: where a record's real shape is written down.
Writes to versioned content have a unit of their own, Writing content, because revisions add rules of their own.