Publish and Tag the API Specifications in Anypoint Exchange
To start governing APIs, you need some APIs to check for conformance, and you need some rulesets that the APIs should conform to. The rulesets and APIs must be published in Anypoint Exchange to be selected in or targeted by governance profiles.
For this project, you use MuleSoft-provided rulesets that are already published in Exchange.
Typically, the APIs you want to govern are already published in Exchange. But because you’re using a trial version of Anypoint Platform in Trailhead, you need to publish some example APIs to Exchange before you create your API Governance profile.
Example APIs
Our example Global Travel Bookings booking app backend consists of three main REST APIs.
- American Flights
- European Flights
- Intergalactic Flights
Download and Extract the Example APIs
Download and extract the APIs to use for this project by following these steps.
- Download the governance API archive file. This is an archive of the zip files that contain the RAML files you publish in this procedure:
- american-flights.zip
- european-flights.zip
- intergalactic-flights.zip
- american-flights.zip
- Extract the zip files from the governance-api-archive.zip file.
Publish the Example APIs
Publish the APIs to Exchange by following these steps.
- Go to https://anypoint.mulesoft.com/exchange/ in the Anypoint Platform account that you created in the previous unit, and log in if you aren’t already logged in.
- Publish and tag the American Flights API.
- Click Publish new asset in the sidebar.
- Provide the following information:
- Name: Enter
American Flights
. - Asset types: Select REST API.
- Method: Select Upload a RAML.
- File upload: Click Choose File and select the american-flights.zip file that you extracted from the governance-api-archive.zip file.
- Lifecycle state: Select Stable.
- Name: Enter
- Click Publish.
- Add the
flight-apis
tag to the American Flights API as follows:- Click Add tags above the sidebar.
- Click Add a tag.
- Type
flight-apis
. - Press enter to apply the tag name to the asset.
- Click Add tags above the sidebar.
- Click Go to assets list.
- Click Publish new asset in the sidebar.
- Publish and tag the European Flights API:
- Click Publish new asset in the sidebar.
- Provide the following information:
- Name: Enter
European Flights
. - Asset types: Select REST API.
- Method: Select Upload a RAML.
- File upload: Click Choose File and select the european-flights.zip file that you extracted from the governance-api-archive.zip file.
- Lifecycle state: Select Stable.
- Name: Enter
- Click Publish.
- Add the
flight-apis
tag to the European Flights API as follows:- Click Add tags above the sidebar.
- Click Add a tag.
- Type
flight-apis
. - Press enter to apply the tag name to the asset.
- Click Add tags above the sidebar.
- Click Go to assets list.
- Click Publish new asset in the sidebar.
- Publish and tag the Intergalactic Flights API:
- Click Publish new asset in the sidebar.
- Provide the following information:
- Name: Enter
Intergalactic Flights
. - Asset types: Select REST API.
- Method: Select Upload a RAML.
- File upload: Click Choose File and select the intergalactic-flights.zip file that you extracted from the governance-api-archive.zip file.
- Lifecycle state: Select Stable.
- Name: Enter
- Click Publish.
- Add the
flight-apis
tag to the Intergalactic Flights API as follows:- Click Add tags above the sidebar.
- Click Add a tag.
- Type
flight-apis
. - Press enter to apply the tag name to the asset.
- Click Add tags above the sidebar.
- Click Go to assets list.
- Click Publish new asset in the sidebar.
- Filter the Exchange asset list to show just the APIs and filters you just added.
- Organization Filter: Global Travel Bookings (root) (or whatever company name you used for your Anypoint Platform account)
- Tag Filter: flight-apis
- Organization Filter: Global Travel Bookings (root) (or whatever company name you used for your Anypoint Platform account)
If you don’t see all three flight APIs in the filtered view, go back over the previous steps and ensure the APIs are properly published and tagged before verifying this unit.
Click Verify Step to earn 100 points to go to the next step in the project to create an API Governance profile.