Nav

Auto-Discovery Reference (Mule 3)

The api-platform-gw gateway global element contains the information needed to register an API in Anypoint Platform. The global element includes the description and tag attributes. The api-platform-gw attributes include the flowRef attribute. In an APIkit project, the global element includes an apikitRef that references the APIkit global configuration.

API Manager 2.x doesn’t support the create attribute. You need to create an API in API Manager before using auto-discovery.

api-platform-gw Attributes

The following table lists the api-platform-gw (gateway) attributes when you use the API Manager 2.x and Mule 3.x:

Attribute Required Description

flowRef

Yes

A reference to the main flow of your project. It triggers the agent to discover this flow and use it when performing the auto-registration.

apikitRef

No

A reference to the APIkit configuration. Used to upload the RAML file to Anypoint Platform after API registration completes and for resource level policies.

apiName

Yes

The friendly API name that appears on API Manager and in Studio on Global Element Properties.

version

Yes

The version number. Management breaks if you change the version in API Portal.

API Manager generates the apiName and version of new APIs managed by API Manager. The name and version are displayed on the API instance dashboard:

name version

If you upgraded a managed API, the existing name and version are preserved to maintain backward compatibility. The following configuration.xml is an example of an API configured for auto-discovery:

Mule Runtime 3.x


         
      
1
2
3
4
5
<api-platform-gw:api apiName="${apiName}" version="${apiVersion}" flowRef="proxy"
  create="true" apikitRef="api-config" doc:name="API Autodiscovery">
  <api-platform-gw:description>Consume site statistics and perform Q3 computations</api-platform-gw:description>
  <api-platform-gw:tag>Q3results</api-platform-gw:tag>
</api-platform-gw:api>

api-platform-gw Nested Elements

The following attributes list the api-platform-gw nested elements.

Nested Element Required Description

api-platform-gw:description

No

A description of the API that appears on the API version details page when Anypoint Platform discovers and registers the API.

api-platform-gw:tag

No

The tag is searchable metadata in the API Manager and API that appears on the API version details page when Anypoint Platform discovers and registers the API.

Auto-Discovery Namespace and Schema

xmlns:api-platform-gw="http://www.mulesoft.org/schema/mule/api-platform-gw"
http://www.mulesoft.org/schema/mule/api-platform-gw
http://www.mulesoft.org/schema/mule/api-platform-gw/current/mule-api-platform-gw.xsd