Introduction
Welcome to the Cosmic REST API v2 docs. This is currently an alpha
release and your feedback is welcome and appreciated. See the changelog for details on what has changed in v2.
For the stable v1 release of the REST API, and interactions with the Cosmic NPM module and GraphQL API, go to https://docs.cosmicjs.com.
For a quick reference to get content from your Bucket, click the "Developer Tools" button found on select pages in your Bucket Dashboard .
Base URL
To keep things concise, all requests use the $BASE_URL
variable to indicate the following base URL:
https://api.cosmicjs.com/v2
Status Check
You can check on the API system status via the Cosmic status page and via the following endpoint:
https://api.cosmicjs.com/v2/status
Postman
We offer a Postman collection for a quick reference to review and interact with all Cosmic REST API endpoints. Follow the steps to install and configure below.
Install and configure
Click the button below to install the collection into your Postman account:
Click the dots then "Edit" option to get into the "Cosmic API V2" collection settings
Edit your variables to match with your Cosmic user account and Bucket API access keys.
Encode queries
If you are using Queries in Postman here's a handy way to encode your
query
param:Add your query as a
param
in your Postman request and select the input or right click:Click the three dots and select "Encode URI Component":
See your query now encoded and ready to use: