Testing on Swagger

To view detailed documentation and to try out the API, use the Swagger endpoint to test using the API directly in the browser. You'll need your GUID, API Key, and API Type. 

Getting Started

You first need to authorize Swagger by setting your API Key value. 

1. In Swagger, click the Authorize Button

2. Enter your API Key in the Value field and click Authorize

3. Click Close

Making a Request

Now that you've set your API Key, you are ready to make a request. 

1. Expand the details of the request so we can see the input parameters and sample responses by Clicking on the Request you want to execute

2. Review the information and then click Try it out, this will also display input fields for each of the request parameters

There are 2 common input parameters that are needed for ALL types of requests - guid, and apitype.

  • guid represents your Instance's unique identifier.  
  • apitype parameter informs the API that you intend to retrieve preview content or fetch (live content only) - valid values are preview and fetch. 

You'll find that all the content-related API calls also require the locale parameter to be set. This is the locale code of your content. 

3. Once you've entered your parameter values, click the Execute button to execute the request which will execute the request, display a sample Curl snippet for the same request, show the Request URL, as well as the Response Body and Response Headers of the request.

Exploring API Models

Every API request returns a type of result. Each type is detailed under the Models area in Swagger, below the list of requests as well as within each request's response. 

How to Determine What Type/Model an API Request will Return?

1. Click to Select and expand the API request you wish to inspect

2. Under Responses for the request, click the Schema link to view the definition of the API return type

Further Reading