Contact Us 1-800-596-4880

Publishing API Specs and Fragments to Exchange

logo cloud IDE Cloud IDE

logo desktop IDE Desktop IDE

Open Beta Release: The cloud IDE is in open beta. Any use of Anypoint Code Builder in its beta state is subject to the applicable beta services terms and conditions, available from the IDE.

Publish your API spec or fragment to Anypoint Exchange so that other team members can find and use it.

Before You Begin

Before publishing an API spec or fragment:

Publish an API spec to Exchange

To publish your API spec to Exchange:

  1. Open your API specification in Anypoint Code Builder.

  2. Open the Command Palette.

    Show me how
    • Use the keyboard shortcuts:

      • Mac: Cmd+Shift+p

      • Windows: Ctrl+Shift+p

    • In the desktop IDE, select View > Command Palette.

    • In the cloud IDE, click the (menu) icon, and select View > Command Palette.

  3. Enter publish and select the following command:

    MuleSoft: Publish API Specification to Exchange
    MuleSoft: Publish API Specification to Exchange highlighted in Command Palette
  4. If prompted, click Allow, and follow the prompts to sign in to Anypoint Platform.

  5. In Select a Business Group, find and select your business group for the project.

    For more information, see Before You Begin.

  6. In Set Project Name, confirm or type the project name and press Enter.

  7. Confirm or change each item and press Enter:

    • Artifact ID, such as OAS-Example

    • Asset version, such as 1.0.0

    • API version, such as v1

    Press Escape to cancel publishing.

    The status bar shows the progress. When complete, you see a message that the API specification successfully published to Exchange:

    Publishing API specification to Exchange notification highlighted
  8. When prompted to implement the API, select:

    • No to avoid scaffolding the API specification into your integration.

    • Yes to scaffold the API specification into your integration.

      If the scaffold fails, see Implementation Errors.

Locate Your API in Exchange

After publishing your API specification, you can find it in Anypoint Exchange:

  1. Navigate to Anypoint Platform and log in using your credentials.

    Show me how
  2. Navigate to Anypoint Exchange.

    Show me how

    Your API specification appears as an asset in your organization, for example:

    API specification in Exchange

You can select the API, navigate through its summary, and see all the endpoints you defined in the previous tasks.

Publish a GraphQL API Spec to Exchange

To publish a GraphQL API specification to Exchange:

  1. Navigate to Anypoint Platform and log in using your credentials.

    Show me how
  2. Navigate to Anypoint Exchange.

    Show me how
  3. Click Publish new asset:

    Publish new asset button in Exchange
  4. Complete the Publish a new asset form:

    Publish a new asset form on Exchange
    1. For Name, type a name for your asset.

    2. For Asset types, select GraphQL API.

    3. For Method, select Upload a GraphQL API Schema.

    4. For File upload, click Choose file and browse for your .graphql schema file.

    5. Click Advanced to change the version number.

    6. For Lifecycle state, select Stable.

  5. Click Publish.

Your GraphQL API spec is now available on Exchange, for example:

"GraphQL API spec on Exchange