This section describes the available API endpoints and how to access and expose them.

Draft and master

The Guillotine application exposes two endpoints per content project:

  • /site/<project-name>/draft - draft items

  • /site/<project-name>/master - published items

As an example, when running the Enonic SDK on your local machine, you may access the items of a project called blog, using the following URLs:

The endpoints handle both POST and GET methods, but GET method is only applicable for Subscriptions via WebSockets.

Custom domain

When setting up Enonic XP in production, the APIs will normally not be publicly accessible. Using Vhosts, you may explose the APIs and even providing custom domain names:

Examples for a project called myproject.

Example - mapping Live API to myapi.com
mapping.my-api.host = myapi.com
mapping.my-api.source = /
mapping.my-api.target = /site/myproject/master
Example - mapping Drafts API to example.com/api
mapping.my-api.host = example.com
mapping.my-api.source = /api
mapping.my-api.target = /site/myproject/draft

For more details about vhosts, check out the XP documentation