Introduction
In this API Reference, find ways to deliver Cosmic content to your websites and apps using the APIs and available clients.
For a quick reference to get content from your Bucket, click the "Developer Tools" button found on select pages in your Bucket Dashboard .
API Access Keys
For read / write access to your content using the APIs and available clients, you will need to provide your Bucket slug and API access keys. Find your Bucket slug and API access keys after you log in to your Cosmic account and go to Bucket Settings > API Access. (Screenshot for reference below)
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 and GraphQL API endpoints. Follow the steps to install and configure below.
Install and configure
- Start by selecting between the REST or GraphQL API. Click the button below to install the collection.
- REST
- GraphQL
Click the dots then "Edit" option to get into the collection settings. (REST version shown below)
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: