Contact Us 1-800-596-4880

API Autodiscovery Reference

The configuration.xml of a project that includes autodiscovery references the main flow where the HTTP listener is configured. From the autodiscovery configuration, API Manager obtains the information necessary to register the APIs described by the global elements. The following configuration.xml is an example of an API configured for API autodiscovery:

<api-platform-gw:api apiName="Q3 API" version="1.0development" flowRef="api-main" 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>

The api-platform-gw global element contains the information needed to register an API in Anypoint Platform. The global element includes the description and tag attributes. The values you set for these attributes appear on the API version details page after registration:

api auto discovery reference 0dc02

api-platform-gw Attributes

The api-platform-gw attributes include the flowRef attribute. In an APIkit project, the last element includes an apikitRef that references the global element.

The following table lists the api-platform-gw attributes:

Attribute Required Description

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.

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.

create

No

Enables/disables the automatic creation of APIs in the Autodiscovery process. If false or not present, the API is still tracked by Anypoint Platform if it already exists. If it doesn’t already exist, the application won’t communicate with the platform.

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.

Autodiscovery Namespace, Schema, and Dependency Information

Namespace and Schema

mule xmlns: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

Autodiscovery Dependency Information

Version information depends on the Mule version.

<dependency>
  <groupId>com.mulesoft.anypoint</groupId>
  <artifactId>mule-module-autodiscovery</artifactId>
  <version>3.8.1</version>
</dependency>