Preview and Delivery APIs

The Preview and Delivery APIs are GraphQL endpoints used to deliver content and media to any app on any channel. GraphQL is a query language for APIs that gives you a flexible way to query the data. It provides a unified interface for managing and delivering both content and media, so you can define endpoints with specified URLs. These endpoints host the schema, which is a strongly typed graph definition where endpoints understand the GraphQL language.

Unlike REST APIs, in GraphQL:

  • There is a formal request body and response format.

  • The endpoints are all serviced by a single controller.

  • No code is required to define an endpoint.

Note

Since GraphQL endpoints are serviced by a single controller, you can use various tools to dispatch multiple queries in a single HTTP request in order to reduce network traffic.

Endpoints

The Preview and Delivery APIs use the following endpoints:

Preview API endpoint

RequestResponse
https://content-api.sitecorecloud.io/api/content/v1/preview/graphql/

Delivery API endpoint

RequestResponse
https://edge.sitecorecloud.io/api/graphql/v1/

GraphQL IDE

You can send requests to the GraphQL server using the following GraphQL IDEs:

Preview API IDE

RequestResponse
https://content-api.sitecorecloud.io/api/content/v1/preview/graphql/ide/

Delivery API IDE

RequestResponse
https://edge.sitecorecloud.io/api/graphql/ide/
Tip

To help get you started, we have compiled several examples.

Authentication

You must authenticate with an API key. The key must be provided in HTTP requests to the API as an HTTP header with the name X-GQL-Token. To obtain an API key, use either the:

After you obtain a key, in the Integrated Development Environment (IDE), on the HTTP HEADERS tab, add the API key using the following format (replacing the example API key):

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

Do you have some feedback for us?

If you have suggestions for improving this article,