Preview API

The Preview API is a GraphQL endpoint that exposes a preview of your content. Use the Preview API to access content that is not approved yet, including drafts. This can be useful when you want to test content in a staging environment before going to production.

Important

For production work, use the Delivery API. The Preview API doesn't have the capacity for high volumes of traffic.

Base URL

The base URL of the Preview API is:

RequestResponse
<ContentHubURL>/api/graphql

Where <ContentHubURL> is your Content Hub instance URL.

Preview IDE

RequestResponse
<ContentHubURL>/api/graphql/preview/ide

Where <ContentHubURL> is your Content Hub instance URL.

Endpoints

The Preview API exposes a single endpoint:

Endpoint

HTTP Verb

<ContentHubURL>/api/graphql/preview/v1

POST

Headers

The API key you use to authenticate with the Preview API can be added to the HTTP HEADERS tab of your Integrated Development Environment (IDE). Use the following format, but replace the sample value with your own unique key:

RequestResponse
{
  "X-GQL-Token":"aEtSNzBsTaEtSNzBMA"
}

Do you have some feedback for us?

If you have suggestions for improving this article,