Add an API Instance from Exchange

To manage the API that you created using Design Center or any another application, you first publish it to Anypoint Exchange (Exchange). You then import the API to API Manager, from which you can modify the API version, status, and other information. After saving your changes, deploy the API to CloudHUb or any other runtime.

Prerequisites

Before you import an API into API Manager, ensure that you have:

  • Access to that API in your organization’s Exchange

  • Reviewed the parameter details to prepare for the inputs that you need provide

Add the Instance from Exchange

To add an API instance by importing from Exchange:

  1. In API Manager, select Manage API > Manage API From Exchange.

    manage api expanded
  2. In API Name, search for the API that you want to manage from the list of available APIs in Exchange.

    The Asset type, API version, and Asset version fields are automatically populated.

    OpenAPI Specification (OAS) 3.0 is supported, with the exception of the callback feature. To work around this issue, handle the callback outside of the Mule runtime engine domain or use an OAS 3.0 specification that does not use callbacks.
  3. In Managing Type, choose the type of API endpoint that you want to create:

    • Basic Endpoint

      Use this option if you created your API outside API Manager, but want to apply policies or otherwise manage the API using API Manager. For example, if you created the API using Mule Runtime, you do not need a proxy.

    • Endpoint with Proxy

      Use this option if you want to provide additional security for your API.

  4. Based on the type of endpoint you are creating, specify the application type for a basic endpoint or the proxy deployment target for an endpoint with proxy.

  5. If you want to manage the API using Mule 4 or later (recommended), accept the default selection.

    The parameters that you must specify differ based on the Mule version you select. For detailed field descriptions, see parameter details.

  6. In Implementation URI, replace the example by entering the URL of the site that hosts the API.

    For example, you can use the URL of your API asset in Exchange. In this case, the API is consuming the JSONPlaceholder API, so enter http://jsonplaceholder.typicode.com.

  7. To secure outbound traffic, in TLS Context for outbound traffic, click the elipses (…​) button next the Add TLS Context link and enter the details in the Select TLS Context window.

  8. If you are creating an endpoint with proxy, accept the base path / for the proxy endpoint in the Path field, or enter another path.

    For example, if an API is defined with the Implementation URI set to http://jsonplaceholder.typicode.com, the proxy returns the following URIs based on the value you configure in the proxy path:

    Proxy Path Request Response from Proxy

    /

    /api

  9. Optionally, to fine-tune additional configurations for the API, expand Advanced options, specify the details, and click Save.

Field Input Reference

The input that you are required to provide when adding an API from Exchange depends on your specific situation, such as whether you want to create an endpoint with proxy, or whether the API was created using Mule 3 or Mule 4:

Field Name Description Required Notes

Implementation URI

The URL to access for the proxy or the API.

Yes

For example, you can use the URL of your API asset in Exchange. In this case, the API is consuming the JSONPlaceholder API, so enter http://jsonplaceholder.typicode.com.

Proxy version

Specifies the version of the proxy to use for the endpoint.

No

Enable Console

Specifies whether you can expose and test your API specification.

No

You can specify a different path in Console Path, for example, "/spec/*".

Validations

Specifies whether to validate inbound requests against a provided specification.

No

You can configure the validations to verify incoming request against provided specifications or by using query parameters.

Scheme

Specifies whether to use HTTP or HTTPS for the validations.

Yes

If you select HTTPS, specify a TLS context for inbound traffic.

API instance label

Specifies a label for the API.

No

If you have multiple managed instances of the same API, add a label to differentiate each instance from the others.

Port

Specifies the number to use if the displayed port is incorrect.

No

Response timeout

Specifies the duration after which a request times out.

No

Reference user domain

Specifies whether to use an API gateway domain.

No

If you chose Hybrid as the proxy deployment target previously in the configuration, ensure that you select this option. You must install the API gateway domain in Mule 3.8 and later.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub