Skip to content

contentstack/contentstack-openapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contentstack CDA/CMA OpenAPI

Contentstack provides OpenAPI files for its Content Delivery and Content Management APIs in JSON format. These files allow you to automatically generate API documentation, test requests, and streamline your development workflow.

This tutorial walks you through how to use these JSON files with Swagger Editor to interact with Contentstack’s APIs.

Content Delivery API (CDA)

To use CDA with Swagger, follow these steps:

  1. Download the latest CDA JSON file and navigate to Swagger Editor.
  2. Click File on top-right and select Import File to upload the JSON.
  3. Open any API request and click the Try it out button to unlock the parameter fields.
  4. Enter your stack's values or use the default demo stack credentials.
  5. Click Execute.

The Responses section will display the following:

  • The API request in cURL format.
  • The response body (JSON).
  • The HTTP status code.

Note: To ensure you are testing against the most accurate environment, always download the latest CDA file from the Contentstack documentation site.

Content Management API (CMA)

To use CDA with Swagger, follow these steps:

  1. Download the latest CMA JSON file and navigate to Swagger Editor.
  2. Click File on top-right and select Import File to upload the JSON.
  3. Before running a request, ensure you have an authentication method ready:
  4. Management Token: We recommend using a management token for CMA requests. Refer to the Generate Management Token guide for details.
  5. Authtoken: Run the Log in API request under the User Session section to retrieve an authtoken in the response.
  6. Open any API request and click the Try it out button to unlock the parameter fields.
  7. Enter your stack's values or use the default demo stack credentials.
  8. Click Execute.

The Responses section will display the following:

  • The API request in cURL format.
  • The response body (JSON).
  • The HTTP status code.

Note:

  • We recommend using the Management token for executing CMA requests rather than authtoken.
  • For any DELETE request that has a request body in it, you won’t be able to run it in Swagger.

About

Contentstack provides OpenAPI JSON files for its Content Delivery and Content Management REST APIs. They are a set of preconfigured requests that will make it easy for you to automatically generate the API documentation and try out our API requests using Swagger Editor.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors