Exporting with the REST API
This page is for developers who build a repeatable export from an Exponential site into a records system, an archive
or another platform. The REST API answers under /api/ezp/<version> with JSON; every content route needs a user by
default and checks that user's permissions (REST API v1 and v2).
Contents
Read routes
Relative to /api/ezp/<version> (v1 and v2):
| Route | Returns |
|---|---|
GET /content/node/<id> | one node (ResponseGroups=Metadata,Locations,Fields, OutputFormat=xhtml for rendered text) |
GET /content/node/<id>/list(/offset/<n>)(/limit/<n>)(/sort/<key>(/asc|desc)) | the children, paged |
GET /content/node/<id>/childrenCount | the number of children |
GET /content/node/<id>/fields, /field/<identifier> | the object's fields |
GET /content/object/<id>, .../fields, .../field/<identifier> | the same by object id |
Writes (create, delete) exist only in v2; an export needs none.
Authentication
rest.ini [Authentication] RequireAuthentication=enabled is the default. Use OAuth2 tokens or a personal API key
of a dedicated export user (API keys). Give that user a role with read access limited to
what the export needs (sections, subtrees); the API asks the user's policies the way the content module does. Answers:
401 without a valid token or key, 403 when the user may not.
A repeatable export
- Choose the root node(s) of what to export (for example the notices folder).
- Walk the tree with
/listin pages (/offset/<n>/limit/<n>), fetching/fieldsfor each object. - Store each object's JSON together with its node id, object id, modification date and the export date.
- Files of file and image fields: check what the field JSON returns for them in your version; where it gives no
address you can fetch, copy the files from
var/storagein a server-side export. - On the next run, compare modification dates and export only what changed.
- Log each run; keep the export user's key in your secret store.
Limits
- The API returns the current published version; earlier versions are not exposed by these routes (use the versions page or a database export for history).
listAtomanswers 500 (a known issue in the guide).- Large exports load the site: run them off-peak and page with modest limits.
Related pages
- REST API v1 and v2
- API keys
- Remote services and apps
- 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.