Skip to the content
Documentation

Getting started with the Exponential REST API

No ratings yet

To call the REST API of an Exponential 6 site you need a user account on the site with the policies for what you want to do (at least content/read), and a credential: a personal API key or an OAuth token.

  1. Sign in to the site and make a personal API key on My account > API access. It is shown once; keep it in an environment variable or a secret store.
  2. Read a node (node 2 is the top of the content tree):
    curl -s -H "Authorization: Bearer $EXP_API_KEY" https://www.example.com/api/ezp/v1/content/node/2
  3. List its children with their fields:
    curl -s -H "Authorization: Bearer $EXP_API_KEY" \
         "https://www.example.com/api/ezp/v1/content/node/2/list/offset/0/limit/10?ResponseGroups=Metadata,Fields"

The answers are JSON. A call without a valid key or token answers 401, one the user may not make 403, an unknown node 404.

For an application that acts for other users, use OAuth 2.0 instead of a key: see Authentication.

Related pages

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.