Headless with the REST API
This page is for managers and product owners who plan an app or a separate front end that shows content managed in Exponential. "Headless" means Exponential keeps the content, editing and permissions, while another program does the presentation. This page explains what that division means for your team and your budget, what the API can and cannot do today, and what to put in a brief for developers. The technical guide is Headless Exponential.
Contents
- What stays in Exponential, and what you build
- Which API for which job
- What the REST API does
- Things to plan early
- What does not exist (yet)
- Briefing developers or an agency
What stays in Exponential, and what you build
From Headless Exponential:
| Kept in Exponential | Built by your front end |
|---|---|
| Content classes, editing, versions, translations, workflows | Page templates, menus, the page frame |
| Roles and policies, checked on every API call | Routing and URL handling |
| The administration and the layouts editor for editors | Rendering of layouts |
| Search, media storage, image aliases | Client-side state and caching |
Your editors' work does not change: they publish in the administration as before. What you add is a second program that has to be designed, built, hosted and maintained.
Which API for which job
| API | For | Read |
|---|---|---|
REST v1 and v2 (ezprestapi) | Reading nodes, children and fields; creating and removing content; OAuth for apps | REST API v1 and v2 for businesses |
| expservices | The administration's functions as services, with discovery and tokens | Remote services |
| ezjscore server functions | Small JSON endpoints your own developers write | JSON endpoints with ezjscore |
For an app that shows your content, the REST API is the usual choice.
What the REST API does
From REST API v1 and v2 for applications:
- Reads a node, its children (in pages, with offset and limit), the number of children, and fields, by node or object id, at v1 and v2.
- Creates and removes content at v2 only.
- Gives a rich text field's value as plain text.
OutputFormat=xhtmladds the node rendered by templates, which gives markup only once a developer has written therestview templates for it. - Gives an image field as the path of its original file only, without the resized versions (aliases). The app asks
for alias addresses through the remote services (
expimage::url,expimage::urls); define aliases for the sizes your app needs. - Checks the user's policies on every read and write, whatever credential was used.
- Requires authentication by default; public front ends use "a read-only integration user" whose key stays on your server.
Things to plan early
| Topic | Why it matters | Source |
|---|---|---|
| Preview | Editors preview with the site's templates; a headless front end "needs its own preview", a protected route that reads drafts. "Plan this early; it is the part teams forget." | Preview and drafts |
| Caching and purging | The REST framework has an answer cache; the front end or a CDN caches too, and must be told when content is published, for example by a workflow event that calls your purge hook | Caching and performance |
| Links inside content | Links in rich text point to site addresses; the front end maps them to its own routes | Rich text, images and links |
| Credentials | Which key or token the app uses, and who can revoke it | Apps and API keys |
| SEO | Content inside an app is not indexed; a website still carries search visibility | Mobile strategy |
Tip
"Start hybrid unless there is a reason not to": keep the website in Exponential's templates and add the app on the API. Preview, layouts and SEO stay simple for the site (Hybrid: templates and API together).
What does not exist (yet)
Stated honestly, from the sources:
- The REST route
listAtomanswers500at v1 and v2; use thelistroute or the site's RSS export instead (8. Known issue: listAtom). - The REST API updates content only with
ezprestapi1.2.9 and Exponential 6.0.15 (each update is a new version). The kernel's GraphQL API can update too, with its mutationupdateContent; it is off until it is switched on (The GraphQL API). - The documentation describes no push-notification service; notifications to a phone are your app's own back end.
- Layouts are rendered by the site's templates; a headless front end renders them itself.
Briefing developers or an agency
Include in the brief:
- To do: Which content the app reads (classes, folders, languages) and whether it writes anything.
- To do: Which credential it uses, held where, rotated how (Apps and API keys).
- To do: The integration user's role: read only, limited to the folders the app needs.
- To do: How editors preview content in the app before publishing.
- To do: How the app learns that content changed (polling with limits, or a purge hook on publish).
- To do: Image sizes the app needs, so matching aliases are defined, and how the app fetches their addresses.
- To do: What the app shows when the API does not answer (App backend reliability).
- To do: That every request goes over HTTPS (
rest.ini [Authentication] RequireHTTPScan refuse plain HTTP).
Related pages
- REST API v1 and v2 for businesses
- Apps and API keys
- Headless Exponential
- REST API v1 and v2 for applications
- Exponential as an application platform
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.