Contact Free trial Login

API Proxy

API proxies, also known as "autogenerated proxies", are meant to enhance the usability of API Manager in your Mule application.

Typical usage: Either when you want to leverage API Gateway capabilities and your backend API is not based on Mule Runtime, or when your API is based on Mule Runtime but you are unable to define the corresponding Autodiscovery element because it is a closed code.

api gateway capabilities mule4 62bf9

When you configure your API to be a Proxy Endpoint, Anypoint Platform allows you to download a preconfigured Mule application. If the application is deployed to a Mule Runtime and you are using the correct Platform Credentials, the API for the application will be automatically tracked by API Manager.

You do not need to know how to create a Mule application. You simply deploy the application to a correctly configured runtime.

Anypoint Platform can deploy the proxy directly to Cloudhub or using the Mule agent, through Runtime Manager.

If you would like to use HTTPS instead of HTTP, you can follow these steps:

  1. Import the autogenerated proxy into Anypoint Studio.

  2. Specify the certificates to be used.

  3. Deploy the application to Cloudhub or a runtime instance.

The proxies that can be downloaded from API Platform are a convenient tool to speed up your Application Network development.
Having said that, you are not restricted to using an autogenerated proxy. Any Mule application, provided with a correctly configured Autodiscovery, can be used to leverage API Gateway capabilities.

API Proxy Versioning

API Proxies follow their own versioning. When creating an API proxy, API Manager always uses the latest proxy version available.
API Proxy version 2.0.0 and later add native support for OAS API specification and are also compatible with RAML 1.0 specifications.

You can specify the version of the proxy you want to use by clicking the Advanced Options drop-down menu and selecting the proxy version that best covers your needs.

API Proxy Validations

You can configure RAML, REST, or WSDL proxies to perform validations on all incoming requests against the API definition you design. Depending on the Mule runtime and API Proxy versions you installed, you can modify these validation settings in API Manager and redeploy the proxy in Mule Runtime.

With Mule 4, you can apply strict validations as well as regular validations. for your API proxies. Additionally, you can also edit proxies directly from API Manager based on the API proxy version. For more information, see the Default Setting by API Proxy Versions table in this section.

Regular Validations

Regular validations enable applications to compare a request with API specifications. As part of the regular validations for REST or RAML proxies, the payload (schema), query parameters, URI parameters, headers, and form parameters are validated. For WSDL proxies, the envelope is validated against the structure provided in the WSDL file. If the proxy receives a parameter that is not specified in the definition, that parameter is irrespectively sent to the backend service.

Strict Validations

Strict validations enable applications to compare a request with proxy specifications and allow only those query parameters that are specified in the API definition. Currently, you can perform strict validations for only query parameters. This feature, which is disabled by default, can be enabled only for RAML and WSDL proxies in Mule 4.

The following tables describe the default settings for API proxies based on different Mule versions:

Default Setting by API Proxy Versions for Mule 3.x Applications

Mule Version API Proxy Default Setting UI Support

3.7x

RAML or WDSL

Disabled

No

3.8x

RAML or WDSL

Disabled

Yes

3.9x

RAML or WDSL

Disabled

Yes

Mule 3.x applications and API proxy compatibility synopsis:

  • Only regular proxy validations are available for Mule 3.x applications.

  • Validations are performed for only WSDL and RAML proxies.

  • Proxies are not versioned in Mule 3.x applications.

  • You can edit proxies from API Manager for Mule versions 3.8.x and later.

Default Setting by API Proxy Versions for Mule 4.x Applications

Mule Version API Proxy Default Setting UI Support

4.x

RAML 1.1.x

Enabled

No

4.x

RAML 1.2.x

Enabled

Yes

4.x

REST 2.0.x

Enabled

No

4.x

REST 2.1.0 or later

Enabled

Yes

4.x

WSDL 1.2.0 and earlier

Disabled

No

4.x

WSDL 1.2.1 and later

Disabled

Yes

Mule 4.x applications and API proxy compatibility synopsis:

  • For Mule 4.x applications, both regular and strict validations are available.

  • Validations are performed for only WSDL and RAML or REST proxies.

  • Proxies are versioned in Mule 4.x applications.

  • You can edit RAML or REST proxies from API Manager for RAML proxy version 1.2.0 and REST proxy version 2.1.0 and later.

See Building a RAML/OAS API Proxy for more information.