+
+

Lab 4: Overview of Anypoint Exchange - Part 2

Overview

In the previous lab exercise, you designed an Order API using API Designer. In this lab exercise, you will publish it to Anypoint Exchange. In the real world, this action is crucial as it informs the larger community that someone is producing a new API, which they might want to reuse.

Similarly to what you accomplished in the previous lab exercise, it is not uncommon for experienced API designers and developers to flesh out the first revision of API minimally and then immediately publish it to Anypoint Exchange to create awareness of the new API. They will then incrementally complete their API specification while publishing point releases to Anypoint Exchange.

Learning Objective

  • Become familiar with the process of publishing assets to Anypoint Exchange.

Step 1: Login to the Anypoint Platform

We authored this lab exercise assuming that you might have stepped away or taken a break, possibly closing your browser. Skip to step 3 of this lab if you are continuing where we left off in the previous lab exercise.

  1. If you are not logged into the Anypoint Platform, open your web browser and navigate to https://anypoint.mulesoft.com.

    lab04 login 1
  2. Enter your credentials into the Username and Password fields.

    lab04 login 2
  3. You should see the Anypoint Platform landing page once logged in.

    lab04 anypoint landing

Step 2: Open your Order API in Design Center

  1. Click on the button labeled Start designing, or click on the hamburger menu, and click on Design Center.

    lab04 start designing
  2. You should see the Design Center landing page, which lists all APIs someone within your organization or business group has already designed or is in the process of designing.

    lab04 design center landing 1

    The screen capture above differs from the landing page seen in the workshop.

  3. Optionally, enter Order API in the search bar to filter the list. Then, click on the name of your project to open it - i.e., <unique prefix> - Order API.

    lab04 design center landing 2

Step 3: Publishing an Asset to Anypoint Exchange

  1. To publish your Order API specification to Anypoint Exchange, click on the Publish button.

    lab04 design center publish
  2. The popup window Publishing to Exchange is already prepopulated with some default values.

    lab04 publishing to exchange
    • The Asset version defaults to 1.0.0, but you could easily change it to a minor version, such as 0.1.0 or 0.5.0.

    • The API version was derived from your API specification and cannot be changed here.

    • The LifeCycle state defaults to Stable, which indicates the API specification is ready to be validated.

    Click on the Publish to Exchange button.

  3. Design Center displays a confirmation it published your API specification to Anypoint Exchange. Click the Close button.

    lab04 published confirmation

    You have now published your Order API to Anypoint Exchange for others to discover, use and reuse. In reality, Anypoint Exchange created two assets:

    • An asset to inform the larger community you are producing a new API, which they might want to reuse.

    • A REST connector to jump-start building client applications of this API. You will have an opportunity to explore connectors in the next lab exercise.

Step 4: Enrich the Asset Documentation In Anypoint Exchange

  1. Click on the hamburger menu in the top left corner, and click on Exchange.

    lab04 hamburger menu to exchange
  2. You should see the Anypoint Exchange landing page.

    lab04 exchange landing

    The screen capture above is for illustrative purposes and differs from the landing page seen in the workshop.

  3. Optionally, enter order api or simply order in the search bar to filter down the list of assets.

    lab04 exchange landing filtered
  4. Then, click on the tile of the asset you just published to open it - i.e., <unique prefix> - Order API. You should now see your API specification and its generated documentation.

    lab04 exchange order api
  5. Click on the pencil icon towards the top and center of the page.

    lab04 exchange order api edit contact
  6. Optionally, enter a short description and your contact information. Finally, click on the check mark to commit any change.

    lab04 exchange order api contact info
  7. Click on the Edit documentation button.

    lab04 exchange order api edit doc
  8. Optionally, enter a long description, providing as many details as possible. As discussed in lab exercise 2, as a developer, your goal is to provide enough documentation to enable self-service. As in most development projects, the more detail you add to an API’s documentation, the more likely the API will be consumed and reused. API consumers should be able to read the documentation, test your API, and determine if it matches their needs without contacting anyone or opening a ticket, for example.

    lab04 exchange order api doc editor

    Notice the following features:

    • Using the Cancel, Save and Publish buttons, we can cancel our changes, save a draft that we will publish later, or publish our changes immediately.

    • The Markdown and Visual tabs, as their name implies, enable us to edit the documentation using the markdown editor or the visual editor.

    • Finally, we can add as many documentation pages as we see fit using the Add new page button.

  9. Click the Publish button to commit and publish your changes immediately.

    lab04 exchange order api doc basic

    MuleSoft’s best practices dictate including the following pages in Anypoint Exchange when documenting APIs:

    • Home: The default page should talk about the basics of what your API does and perhaps provide an example (diagram) of how your API is currently consumed.

    • How to Consume: This page describes how a developer can consume/get access to your API and the steps to perform to invoke the API successfully.

    • Security: This page specifies the security-related details of your API so that a consumer is aware of the API’s security scheme, authentication, etc., to invoke the API successfully.

    • Environments and Testing: This page talks about the different environments where this API is available and the URL for each of those environments. This page also briefly discusses sample data that a user can pass to test your API in these different environments.

    • Support: This page prescribes the support-related details for your API. This information may include the author, owner, support team, etc., and prescribe who to contact for questions, enhancement requests, and potential issues and bugs.

Summary

This lab exercise revisited Anypoint Exchange, but more from the content producer perspective. First, you published your Order API to Anypoint Exchange. Then, the lab exercise guided you through some basic capabilities to augment and improve your API documentation. The following lab exercise will focus on Anypoint Studio - e.g., implementing your Order API.

Proceed to Lab 5: Overview of Anypoint Studio to continue.

Submit your feedback!
Share your thoughts to help us build the best workshop experience for you!
Take our latest survey!