How to use MuleSoft Platform APIs to manage API Specifications

Anypoint Exchange provides API features to the MuleSoft Developer Community for publishing and consuming assets using Mavin Facade and searching for assets using the Graph API. When developing with MuleSoft, developers might find it easiest to manage their API specifications using Anypoint Platform APIs. In this tutorial, you will learn how to programmatically manage your API specifications via Postman.
Before we start, you can download the collection/environment by clicking the button below:
If you are new to Postman or Platform APIs, make sure you have seen this article on MuleSoft Platform APIs to understand the basics from Platform APIs, Exchange, and Design Center — and to ensure that Postman is set up correctly with the collection/environment imported and the right values for token, Organization ID and Environment ID
The first step is to decide what Business Group to work on and add the Business Group ID to your Postman environment variable business-group-id, see animation below on how to get your Business Group ID (called Organization ID for the Master Business Group). Go to access management, then organizations, and click the desired Business Group

We need an API specification and an Exchange Asset, click the button below to download the ZIP:
Go into Exchange, click on Publish a New Asset then selecting RAML and uploading the file, you can follow the animation below:

Now, add tag ‘flights’ to this Asset. In Postman look for the Exchange folder then Tag folder. In Add Tag to Asset, all values are preloaded. If you have a different asset name or version update the Postman Variables (asset-name and asset-version).

Instead of adding a Tag directly to an Asset, Categories are slightly different as they consist of two steps, first you need to create it and only then you can link it to a specific asset. Let’s start creating a Category API Layer with value ‘Experience API.’ In the Categories folder of your Postman, find and run Create Category Request, below you can see how it will look when it is successful:

We want that Category to be shown (linked) to our Asset, go to the Category folder and run Link Category to Asset.

Similar to Categories, let’s add a Field Support Team with the email "exp-american-flights-team@example.com." Open Fields folder and Create the Field as below:

Once done, you can go into Field folder and Link Field to Asset, as shown here:

We have added Categories, Fields, and Tags to our Asset through HTTP Requests, this is how it should look like now:

The Asset is now ready to be searchable (make sure you check this resource), this is an example on the search:

We hope that this tutorial provided you with an introduction of how to use Anypoint Platform APIs to manage your API Specifications by adding metadata for discoverability. There are so many additional ways you can use Anypoint Platform APIs to manage your APIs and integrations. Please share with us how you are using Anypoint Platform APIs or any feedback on this tutorial by tweeting to @MuleDev. If you would like to read more tutorials, please visit the developer tutorials homepage to keep learning.