Skip to content

Exponential CMS

The REST API

The content routes of REST API v1 and v2, how a client signs in, and the settings that drive the API.

Requests to /api/ go to index_rest.php. In Exponential 6.0.15, version 1 and version 2 of the content API come from one extension, ezprestapi, activated with ActiveExtensions[]=ezprestapi. The older ezprestapiprovider extension is deprecated: its last release is a compatibility layer on top of ezprestapi, so activate ezprestapi and remove ezprestapiprovider from ActiveExtensions.

Routes

Paths are relative to /api/ezp/<version>. ezpl is an alias prefix of ezp with the same routes and answers. Reads answer at v1 and v2; writes answer at v2 only.

GET    /content/node/<id>                        one node
GET    /content/node/<id>/list(/offset/<n>)(/limit/<n>)
GET    /content/node/<id>/childrenCount
GET    /content/node/<id>/fields
GET    /content/node/<id>/field/<identifier>
GET    /content/object/<id>                      the same by object id
POST   /content/node/create                      v2: create and publish
POST   /content/node/<id>                        v2: update (PUT also works)
DELETE /content/node/delete/<id>                 v2: remove

An update publishes a new version of the object with the values sent; create and update take a JSON body as well as form fields. Answers: 200, 201 for a create, 202 when a workflow holds an update, 400 for a missing or unknown field, 401 without a valid token or key, 403 when the user may not, 404 for an unknown node.

Permissions

Every read and write checks the user's own policies (content/read, content/create, content/edit, content/remove), whatever the request signed in with. A program never gets more than the user it acts for.

Signing in

rest.ini [Authentication] RequireAuthentication=enabled is the default: every content route needs a user. Two credentials are accepted:

  • A personal API key, sent as Authorization: Bearer expk_..., for a script of your own.
  • An OAuth 2 token from POST /api/auth/v1/oauth/token, for an application that signs in other users.

Both are explained in API keys and OAuth 2.

A first call

curl -s https://www.example.com/api/ezp/v2/content/node/2 \
     -H "Authorization: Bearer $EXP_API_KEY"

Cross-origin requests

Cross-origin access for REST is off until you allow it in rest.ini [CorsSettings], with Cors=enabled and the allowed origins listed in AllowedOrigins[].

Note: Two-step sign-in is not asked on REST by default; a site can opt in per sign-in path. See Security. For a typed query language, see GraphQL, step by step.

Last updated 11/26/2026. Something missing or wrong? Write to info@se7enx.com.