Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

contentstack/contentstack-postman-collections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contentstack

Contentstack Postman Collections

The Contentstack Postman Collection is a set of preconfigured requests that will make it easy for you to get started with the Contentstack APIs and try out our API requests through the popular Postman REST client.

Install Postman

To use the Contentstack Postman Collection, you will need the latest Postman app installed on your device. Postman is available for Windows (x32), Windows (x64), Mac, and Linux environments.

Contentstack Postman Collections

Contentstack Postman collection covers all the Content Delivery, and Content Management, and GraphQL Content Delivery API endpoints for Contentstack.

Click on the respective Run in Postman button to automatically import the collection along with the respective environment file into your Postman app. (Or, you can download the JSON file of the respective Postman Collection and import the file in Postman.)

CDA Postman Collection

Run in Postman

CMA Postman Collection

Run in Postman

Note: For Windows, downloading the Content Management API collection doesn't download the environment automatically due to the larger size of the environment file. Consequently, Windows users need to download the respective environment file manually and import it in their Postman environment.

GraphQL CDA Postman Collection

Run in Postman

Environment Files

Though clicking on any of the above Run in Postman buttons will automatically import the collection along with the respective environment, you can also download and import the environments manually:

Note: By default, the environment file for the “North America” region is imported. To import the environment file for the “Europe” region, you need to download the respective environment listed above and import the content into Postman.

Update Postman Collection

As Contentstack releases new features and keeps adding API requests associated with the release, it’s better to use an updated version of Postman collection. To get an updated version of our Postman Collection, you can either re-import the collection by clicking the “Run in Postman” button mentioned above or by running this script.

To update the existing version of Contentstack’s Postman collection, perform the following steps:

  1. You can either download this repository or clone it by running the following command in your terminal:

        git clone https://github.com/contentstack/contentstack-postman-collections.git
  2. Inside the terminal, run this command to go in postman folder:

        cd contentstack-postman-collections
  3. Install necessary modules by running either npm install or npm i command in the terminal.

  4. Navigate to the .env file, and add your Postman’s API key and collections’ UID.

    To get Postman’s API key, you need to log in or create a Postman account and get the API key. To learn how to create an API key, refer to the Postman’s API key generation article.

    To get collections’ API Key, refer to the Get All Collections API request.

  5. To pull or clone our latest postman collection, run npm start in the terminal. This will clone our collections in the ".latest-collection" directory.

    Note: If this command does not work in any powershell, try switching to Bash terminal by following the steps discussed in this section.

  6. Run the following command to update your postman collection:

        #For updating whole collection: 
        npm run updateAll
        
        #For updating single collection: 
        npm run update <collection_name>  

    Specify the name of collection in place of <collection_name>. Type cda for “Content Delivery API”, cma for “Content Management API”, and graphql for “GraphQL Content Delivery API”.

  7. While the above steps will update your postman collection, you still need to download and import the environment file manually.

Define Environment Variables

Contentstack recommends using environments instead of global or collection variables. For ease of use, when you download a collection, you download the respective environment too.

Here are certain variables that you need to update accordingly.

Variable

Description

Example

{{base_url}}

Enter the “North America” endpoint

api.contentstack.io

cdn.contentstack.io

graphql.contentstack.com

Enter the “Europe” endpoint

eu-api.contentstack.com

eu-cdn.contentstack.com

eu-graphql.contentstack.com

Usage

Once you download the Postman app and download the latest collection, perform the following steps:

  1. Make sure to select the appropriate API environment on the top right.
  2. Add your credentials and other required environment variables.
  3. [For CMA Users only] If you are using Postman Collection for Content Management API requests, run the User Session Authentication request. Your authtoken will be automatically stored in a cookie. To avoid this, we recommend you to whitelist your API domain.
  4. Make the API Requests that you need.

For more details refer to our documentation.

Postman Collection Updates

We periodically update our Postman Collection. So, you may need to download it from time to time to stay up to date with the latest changes.

See Also

Content Delivery API Postman Collection

Content Management API Postman Collection

GraphQL Content Delivery API Postman Collection

About

The Contentstack Postman Collection is a set of preconfigured requests that will make it easy for you to get started with the Contentstack APIs and try out our API requests through the popular Postman REST client.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors