Contact Us 1-800-596-4880

Adding an API Instance on a Self-Managed Server

If you are running an API on a self-managed server, you have two options for adding an API instance:

  • Manage API from Exchange

  • Create new API

Manage API Instance from Exchange

To manage an API instance from Exchange:

  1. Navigate to Anypoint Platform > API Manager.

  2. In API Administration, click Add API and select Add new API.

  3. Select Mule Gateway as your runtime.

  4. Select Deploy a proxy application for Proxy type.

  5. Select Hybrid for Target type.

  6. Click self-managed server link at the bottom of the page.

  7. Click Manage API from Exchange. .

  8. 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.
  9. For 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.

      Select the Application type from the following options:

      • Mule Application: Use this option if you are running a Mule application.

      • Non-Mule Application managed by Anypoint Service Mesh: Use this option if you want to manage Kubernetes-based non-Mule microservices with Anypoint Service Mesh.

    • Endpoint with Proxy: Use this option if you want to provide additional security for your API.

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

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

  11. 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.

  12. To secure outbound traffic, in TLS Context for outbound traffic, click Add TLS Context and enter the details in the Select TLS Context window.

  13. 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

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

Create new API

To create a new API instance and configure the endpoint:

  1. Navigate to Anypoint Platform > API Manager.

  2. In API Administration, click Add API and select Add new API.

  3. Select Mule Gateway as your runtime.

  4. Select Deploy a proxy application for Proxy type.

  5. Select Hybrid for Target type.

  6. Click self-managed server link at the bottom of the page.

  7. Click Create new API.

  8. Enter a name for your API.

  9. Select an asset type.

  10. Select a file upload if needed.

  11. Click Continue.

  12. For 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.

      Select the Application type from the following options:

      • Mule Application: Use this option if you are running a Mule application.

      • Non-Mule Application managed by Anypoint Service Mesh: Use this option if you want to manage Kubernetes-based non-Mule microservices with Anypoint Service Mesh.

    • Endpoint with Proxy: Use this option if you want to provide additional security for your API.

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

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

  14. 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.

  15. To secure outbound traffic, in TLS Context for outbound traffic, click Add TLS Context and enter the details in the Select TLS Context window.

  16. 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

  17. 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.