This section describes the available API endpoints and how to access and expose them.
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
GET methods, but
GET method is only applicable for
Subscriptions via WebSockets.
When setting up Enonic XP in production, the APIs will normally not be publicly accessible. Using Vhosts, you may expose the APIs and even providing custom domain names:
Examples for a project called
mapping.my-api.host = myapi.com mapping.my-api.source = / mapping.my-api.target = /site/myproject/master
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
Starting from version 6.2.0, the Guillotine exposes a new GET
/site/<project-name> endpoint to provide a query playground with GraphiQL UI, which can be enabled or disabled via config file
To enable the endpoint:
To disable the endpoint:
The default value is determined by the XP distribution type: on server-based distributions the endpoint is off, while on SDK-based distributions it is on.