Setting up Guillotine

Contents

This section describes how to install and access the Guillotine API

Installation

Guillotine is available as an Enonic app. Guillotine will normally be pre-installed when you create a new solution in the self-service cloud, or when setting up a new SDK Sandbox.

To install it manually, follow the instructions on Enonic Market.

Endpoints

Once installed to your Enonic environment, Guillotine exposes two endpoints per content project:

  • HTTP POST :8080/site/<project>/draft - Drafts API

  • HTTP POST :8080/site/<project>/master - Live API

  • HTTP GET :8080/site/<project> - optionally serves Query Playground

<project> must be replaced with an actual content project in your installation.

Enonic Cloud / Kubernetes

When using Enonic’s self-service hosting (or the Enonic K8s Operator), expose the API publicly by creating an Ingress.

You may expose an entire project, or just a selected branch.

The following example exposes the entire project:

In your Ingress, specify the target as /site/<project> (where <project> is replaced with your actual project name).

If the Ingress is example.com/api, you will now be able to access the master and draft APIs on example.com/api/master and example.com/api/draft respectively.

Access to the draft API is by default closed for unauthorised access.

Using Vhosts

For other hosting options, you may expose the API on custom domains or URLs using vhosts:

Examples for a project called myproject:

Example - mapping API to myapi.com
mapping.my-api.host = myapi.com
mapping.my-api.source = /
mapping.my-api.target = /site/<project>/master
Example - mapping entire project root to example.com/api
mapping.example-api.host = example.com
mapping.example-api.source = /api
mapping.example-api.target = /site/<project>

For more details about vhosts, check out the XP documentation


Contents

Contents

AI-powered search

Juke AI