logo
logo

Quickstart guide

This quickstart guide shows you how to create and publish your content collections using the Delivery platform API.

Tip

For an introduction to Experience Edge, see Getting started with Experience Edge for Content Hub available on the Discover Sitecore channel.

The quickstart guide covers the following steps:

  1. Create a content collection
  2. Publish a content collection
  3. Generate an authentication key
  4. Use the Delivery API to fetch the content collection

Create a content collection

Before publishing it to the delivery platform, you need to create a content collection.

To create a content collection:

  1. On the main menu bar, click Content and select Content collections.
  2. On the Content collections page, click + Content collection.
  3. In the Content collection dialog box, enter a name and a description, then click Save.
  4. On the Collection page, on the upper right, click + Add.
  5. To add content to your collection, in the drop-down menu, select one of the available options: +Content, + Add existing items, or Paste from clipboard .

Publish a content collection

Content collections are published when they are in the Final state of the lifecycle workflow.

To move the content collection to the Final status and publish it:

  1. On the main menu bar, click Content and select Content collections.
  2. On the Content collections page, select the collection you want to publish.
  3. On the Collection detail page, on the upper right, click Done .

Generate an authentication key

To access the delivery platform, you need an authentication key.

To create an authentication key for the Delivery API:

  1. On the main menu bar, click Content and select Content collections.
  2. On the Content collections page, select the content collection for which you want to create an API key.
  3. On the Collection detail page, on the upper right, click More actions and then select API keys.
  4. In the API keys dialog box, click + API key.
  5. In the API keys dialog box, enter a name for the key and select Delivery, then click Create.
  6. Copy and save for future use the generated token which represents your API key.

Use the Delivery API to fetch a content collection

Using the delivery API, you can fetch a content collection by sending a POST request to the Delivery API endpoint https://edge.sitecorecloud.io/api/graphql/v1.

Important

Provide the API key token in the header as an X-GQL-Token parameter.

To fetch all content collections you are authorized to access with the created API token, use the following code in your request body:

{
  allM_ContentCollection {
    results {
      contentCollectionName
      id
    }
  }
}

To get information on a specific content collection, use the following code in your request body:

{
    m_ContentCollection (id: <ContentCollectionId>) { 
        createdBy
        createdOn
        contentCollectionDescription
        }
}

Example request using Postman

The following example is performed using Postman:

  1. To target the delivery URL, use the following POST request and provide the API key token in the header:

  2. To request all content collections, use the following GraphQL query in the request body:

  3. As a result, you receive a list of content collections:

  4. Then, submit a second request to get more details on the content collection named New1:

  5. The result is as follow:

Can we improve this article ? Provide feedback