+

Adding an API Instance

After you have created an API using Design Center or any other application, you can then manage that API in API Manager by adding an API Instance.

There are three options for adding an API Instance:

  • Add a new API: Select this option to add a completely new instance of an API.

  • Promote API from environment: Select this option if you have an API Instance in a different environment, for instance the sandbox environment, and you want to promote it to the current or production environment.

  • Import API from zip file: Select this option if you have exported an API Instance from a different Anypoint Platform instance.

When you are promoting or importing an API Instance, you will not have options to alter the configuration. However, when you add a new API Instance, you will need to configure the endpoint as well as other settings.

Add a New API

  1. Log in to Anypoint Platform.

  2. In the navigation bar or the Anypoint Platform page, click API Manager.

  3. Click Add API and select Add new API.

  4. Select and configure your runtime from the following options:

    • Flex Gateway: Select Flex Gateway for any APIs that need a flexible, performant API gateway that will work with distributed and microservices environments and fit into your CI/CD environments.

      Choose the connected Flex Gateway you have installed and registered from the list under Select a gateway.

      If you do not see a Flex Gateway listed, or you see a Flex Gateway but its status is DISCONNECTED, See Install Flex Gateway and Register and Run in Connected Mode for more information.
    • Mule Gateway: Select Mule Gateway if you have APIs on Mule Runtime that need an API gateway to manage, observe, and secure your APIs.

      Select the Proxy type from the following options:

      • Connect to existing application (basic endpoint): Use this option to directly interact with a Mule runtime Engine (Mule) application when your application is configured with API gateway autodiscovery. See API Autodiscovery for more information.

        Select the Mule version.

      • Deploy a proxy application: Use this option to interact by proxy with an application, either because it is a Mule application not configured with API gateway autodiscovery or because it is not a Mule application. See Configure Proxies for your APIs for more information.

        Select the Target type from the following options:

        • CloudHub: Select CloudHub if you want to use the Mule runtime hosted on the cloud by MuleSoft. The CloudHub proxy includes a CPU with 0.1 vCores and a memory of 500 MB, by default.

          1. Select the Runtime version.

          2. Enter a Proxy app name.

        • Hybrid: Select Hybrid if you have a Mule runtime running on an on-premises server that you want to use. See Register a server in Runtime Manager for more information.

          If you are running an API with a self-managed server, use the classic API creation flows to manage your API.
          1. Select a target from the list or click Add server.

          2. Enter a Proxy app name.

    • Service Mesh: Select Service Mesh to extend Anypoint Platform API Management capabilities to your Istio service mesh through the deployment of a Mule Adapter.

      After adding the API on Anypoint Platform, you will need to bind it to a service using the Anypoint Service Mesh client. See Methods for Configuring Anypoint Service Mesh for more information.
  5. Click Next.

  6. Select an API from the following two options:

    • Click Select API from Exchange if you have an API shared with you through Exchange that you want to manage.

      1. Click the API from the list under Select API. You can search for a specific API if needed.

      2. Update the Asset type, API version, and Asset version if needed.

    • Click Create new API.

      1. Enter a name for the new API asset.

      2. Select the Asset type from the following options:

        • REST API: Select REST API if you have an RAML or OAS API definition file you want to include for your asset.

          Upload either a RAML or OAS file for your REST API.

        • HTTP API: Select HTTP API if you do not have an API definition file you want to include for your asset.

        • SOAP API: Select SOAP API if you have a WSDL API definition file or an external link to the file.

          Upload a WSDL file for your SOAP API or add the link to the file.

          This option is not available for Flex Gateway runtime at this time.

      3. Optionally, you can add an AssetId and customize the Version or API Version details by clicking Advanced.

  7. Click Next.

  8. Configure the Endpoint and other settings:

    • Enter the Implementation URI for this API. The Implementation URI is the URL to access the proxy or the API. For example, you can use the URL of your API asset in Exchange. This is the only required field.

    • Update the other fields if needed. For further details on the other optional fields, see Configure an API Endpoint.

  9. Click Next.

  10. Review your selections. You can edit each section if necessary.

  11. If you are ready to deploy, click Save & Deploy, otherwise you can select Save, to save the API Instance and deploy it at a later time.

Promote API from Environment

  1. Log in to Anypoint Platform.

  2. In the navigation bar or the Anypoint Platform page, click API Manager.

  3. Click Add API and select Promote API from environment.

  4. Select the Source Environment.

  5. Select the API by entering the name of the API into the search field.

  6. Select the API Version.

  7. Select the API instance label.

  8. Optionally, uncheck any of the Include in Promotion options you want to exclude.

  9. Click Promote.

  10. Review and update the Runtime & Endpoint Configuration details as needed and click Save.

Import API from Zip File

  1. Log in to Anypoint Platform.

  2. In the navigation bar or the Anypoint Platform page, click API Manager.

  3. Click Add API and select Import API from zip file.

  4. Click Choose file and select your API Instance configuration zip file.

  5. Click Next.

  6. Review and update the API Configuration details as needed and click Save.

Notes

  • Although OpenAPI Specification (OAS) 3.0 is supported, the callback feature is not. To work around this issue, either handle the callback outside of the Mule runtime engine domain or use an OAS 3.0 specification that does not use callbacks.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub