Interface GraphQL API

Contents

Setup

Authorization

In order to access the Document REST API you must first create an API-Key.

Then you must provide that API-key in the Authorization header when you do any http request against the API.

For example if you have an API-key with the key "mySecretKey", the Authorization header must look like this:

Authorization: Explorer-Api-Key mySecretKey

vhost configuration

com.enonic.xp.web.vhost.cfg
enabled = true

mapping.interfaceApi.host = localhost
mapping.interfaceApi.source = /interfaces
mapping.interfaceApi.target = /webapp/com.enonic.app.explorer/interfaces/api/v1
mapping.interfaceApi.idProvider.system = default

Endpoints

I’m using the vhost configuration above as basis for the example urls below.

I’m also assuming a valid Authorization is provided.

REST

interfaces

If you visit http://localhost:8080/interfaces you will get a list of the interface GraphQL endpoint you can use.

GraphQL

interface_name

Use a tool like GraphiQL to connect to the http://localhost:8080/interfaces/interface/interface_name GraphQL endpoint, read the autogenerated GraphQL documentation, and experiment with queries you can use when you implement an Explorer client.


Contents