Skip to main content

时间估计

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.

  1. Download the governance API archive file. This is an archive of the zip files that contain the RAML files you publish in this procedure:
    1. american-flights.zip
    2. european-flights.zip
    3. intergalactic-flights.zip
  2. Extract the zip files from the governance-api-archive.zip file.

Publish the Example APIs

Publish the APIs to Exchange by following these steps.

  1. 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.
  2. 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.
    • 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 Go to assets list.
  3. 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.
    • 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 Go to assets list.
  4. 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.
    • 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 Go to assets list.
  5. 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

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.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈