Skip to main content
Contact Us 1-800-596-4880

Explore the Anypoint Platform APIs with the Postman Collection

10 min read

We would like to thank Amir Khan for their contribution to this developer tutorial.

In this tutorial, you will learn how to:

  • Access the Postman collections for the Anypoint Platform APIs
  • Fork the Postman collection and environment variables into your local workspace
  • Use the Postman collection to authenticate and set key environment variables
  • Use the Postman collection to retrieve data from Anypoint Platform with some commonly used examples



Prerequisites

  • Anypoint Platform - To access the Anypoint Platform APIs, you need to have a valid Anypoint Platform account. You can sign up for a free trial account here.
  • Postman - The Postman collections also require you to have a valid Postman account. Download Postman here.

Postman Collection Overview

Anypoint Platform APIs for Postman is a collection of API requests to help you interact with Anypoint Platform without using the user interface. The collection includes examples of request templates grouped into folders and a template environment with variables and header presets.

Building from API request templates instead of going into each API’s documentation saves you a lot of time and greatly reduces the risk of errors and that’s the goal of this collection.

This collection pack contains the Anypoint Platform APIs Postman collection for the following areas:

  • Authentication
  • Design Center
  • Exchange
  • Management Center
    • Access Management
    • API Manager
    • Runtime Manager
    • Visualizer
    • Secret Manager

Fork the Postman Collection

The Postman collections for the Anypoint Platform APIs are available through the Postman public API network. Use the following button to access the public workspace:

MuleSoft API - Postman

On the landing page, select Anypoint Platform APIs.

MuleSoft APIs Postman Collection overview

This will open the public workspace containing the Postman collections. To use the Postman collections, you need to fork them into your local workspace. Click on the Fork button as shown below.

Fork Postman collection

You will be asked to provide:

  1. A label for your fork
  2. Selection of the workspace into which you want to fork the collections
  3. Confirm Fork Collection

Postman - create fork

You can uncheck the Watch original collection option if you want to keep working in your local workspace without any changes to the collections.

The collections will be loaded into your local Postman workspace.

Postman - local workspace

Fork the Postman Environment

Go back to the MuleSoft API Postman collection or use the following button to access the public workspace:

MuleSoft API - Postman

Click on the Environments button located on the left side of the screen and select the Anypoint Platform environment. Click on Fork.

Postman - environments

You will again be asked to provide:

  1. A label for your fork
  2. Selection of the workspace into which you want to fork the environment (you should select the same workspace you previously selected for the collection)
  3. Confirm Fork Collection

Postman - environment fork

Now you are ready to use the environment along with the Postman collection pack.

Set Up the Environment Variables

This collection pack contains an environment called Anypoint Platform (which you just forked). You must set the following values before you use any request.

Variable Current Value
url https://anypoint.mulesoft.com

This is Anypoint Platform’s URL
username The username you use to log in to Anypoint Platform
password The password you use to log in to Anypoint Platform

Make sure you modify the current value and not just the initial value.

All other variables are optional or related to specific requests. To set the variables, select the Anypoint Platform environment in Postman as shown below. Then, click on the Edit button next to the value you want to change.

Postman - edit environment variables

Once you have entered the correct variable values in the Anypoint Platform environment, you can make use of the Login to Anypoint Platform POST request in the Authentication folder. This request will save the token bearer to the environment variables and use it in all subsequent requests.

Authentication > Login to Anypoint Platform

After you have logged in, you need to get your profile information to set the organization_Id. This is set by the Get profile information GET request in the Authentication folder. After the execution of this request, the organization_Id variable will be set for all the subsequent requests.

Authentication > Get profile information

After the basic setup is done, you can now use the majority of the requests in Postman with your Anypoint Platform environment.

Example Uses for the Postman Collection

Here you can find some examples of accessing data using the Postman collection pack.

Get all projects

This request allows you to get all metadata for the API specifications in Anypoint Design Center including the internal git path for the specification file. To access all projects using the collection pack, go to the folder Design Center > Projects and select the Get all projects request. Run this request to retrieve all projects within the organization_Id.

Design Center > Projects > Get all projects

Get all assets

This request allows you to receive metadata for all your uploaded assets (Specification, Examples, REST APIs, etc.) from Exchange. To access all assets using the collection pack, go to the folder Exchange > Assets and select the Get all assets for organization by Id request. Run this to retrieve all projects within the organization_Id.

Exchange > Assets > Get all assets for organization by Id

Get all environments

This request allows you to access metadata of all your Design Center environments. To retrieve the environments information using the collection pack, go to the folder Design Center > Environments and select the Get all environments request.

Design Center > Environments > Get all environments

Get all users

This request allows you to access all metadata for all users working with Anypoint Platform. To retrieve the users’ information from Access Management using the collection pack, go to the folder Management Center > Access Management > Users and select the Get all users request.

Management Center > Access Management > Users > Get all users

Get all regions

This request allows you to access metadata to all available deployment regions in CloudHub. To retrieve the regions’ information from ClourHub using the collection pack, go to the folder Management Center > Runtime Manager > Applications > CloudHub and select the Get all regions request.

Management Center > Runtime Manager > Applications > CloudHub > Get all regions

Invite users to Anypoint Platform

This request allows you to register new users to Anypoint Platform. Perform the following request in the defined sequence to register / invite new users to your Anypoint Platform tenant. To invite new users, go to the folder Management Center > Access Management > Users and select the Invite users request. You need to have the role_group_id field in the body of the request before calling this. To get the group roles, go to the folder Management Center > Access Management > Rolegroups and call the Get all rolegroups request to retrieve all rolegroups.

Management Center > Access Management > Rolegroups > Get all rolegroups

Copy the required role_group_id and name. Go back to the Invite users request and select Body. Enter the copied values to the corresponding fields.

Management Center > Access Management > Users > Invite users

Next Steps

In this tutorial, you have learned how to:

  • Access the Postman collections for the Anypoint Platform APIs
  • Fork the Postman collection and environment variables into your local workspace
  • Use the Postman collection to authenticate and set key environment variables
  • Use the Postman collection to retrieve data from Anypoint Platform with some commonly used examples

Check out the rest of our developer tutorials to continue your development journey.

Previous

Try Anypoint Platform for free

Start your 30-day free trial of the #1 platform for integration, APIs, and automation. No credit card required. No software to install.

Try for free

anypoint product trial zigzag