You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

About Auto-Discovery

API auto-discovery is the mechanism to manage an API from API Manager by pairing the deployed application to an API created on the platform. API Management includes tracking, enforcing policies if you apply any, and reporting API analytics. Critical to the auto-discovery process is identifying the API by providing the API name and version.

Unsupported Use of Auto-Discovery

Multiple auto-discovery elements pointing to an API instance is unsupported. For each supported Mule runtime version for an API instance, you can have only one autodiscovery element pointing to the API in API Manager.

Configuring Auto-Discovery

If an API is not registered on Anypoint Platform, auto-discovery triggers that registration. If you manually register and deploy an API, you need to enable auto-discovery to use the API Gateway. If the API is not registered, you need to provide the credentials as follows:

  • Deploy from Studio

    Studio 6.0: Add organization credentials to Studio Preferences. For more information, see the Studio 6 documentation (link below).

  • Deploy the API through API Manager or Runtime Manager.

    The client ID and client secret are configured automatically.

  • Deploy from the Mule command line.

    You configure the client ID and client secret in $MULE_HOME/conf/wrapper.conf as described in the next topic.

  • Deploy some other way.

    Set system properties in Runtime Manager. In the property settings using the following names:

    • anypoint.platform.client_id={your client ID}

    • anypoint.platform.client_secret={your client secret}

Auto-discovery Process

The following diagram illustrates the auto-discovery process for a project containing an api-platform-gw:api auto-discovery global element in the configuration.xml:


After API registration, the API version and its endpoint function the same as any other API version or endpoint. You can edit, update, or delete the API. If the Mule runtime or API Gateway runtime instance running the API goes offline, or you stop the underlying application, the API and endpoints remain in API Manager, but the endpoints are untracked by the agent.