Contact Us 1-800-596-4880

Classifying an API Instance into an Environment

After you upgrade to API Manager 2.x your APIs are placed in an unclassified environment. You need to classify unclassified APIs to govern or otherwise manage the APIs.

Even though API Manager supports tracking APIs with both organization and environment credentials, MuleSoft recommends using environment credentials since the permissions associated to them are more restrictive. You need to restart Mule Runtime after changing credentials. Restarting can cause downtime. See Configuring Mule Servers with Environment Credentials (Advanced Classification: Optional) below for details on how to change them. After doing so, you may classify your API to an environment that API Manager will suggest.

Using credentials from one environment does not allow:

  • Tracking APIs from different environment

  • Tracking APIs from different organizations

If you need to track APIs in either of these ways, use organization credentials.
Follow Configuring Organization Credentials in Mule Runtime 4 or Configuring Organization Credentials in Mule Runtime 3 depending on the Mule runtime version you are using.

If you need to track APIs using environment credentials review the advanced section.

Classifying the API Instance on API Manager

  1. In API Manager, click the environment control, which is labeled SANDBOX in this example:

    API Manager API Administration with the environment sandbox selected.

    If you do not have a suitable environment you want to classify the API into, create the environment in Access Management. See To Create a New Environment and Reviewing Environment Concepts for more information.

  2. Select Unclassified.

    The Switch Environment dialog showing the environments.
  3. Click Switch.

    A list of unclassified APIs appears.

    API Administration dialog box showing a list of unclassified APIs.
  4. Click Classify.

  5. For Target environment, select the environment for the API from the list of environments available to you. For example, select Test.

  6. For Instance name, optionally type a unique instance name. For example, type abc-api-1.

    For environments, APIs can have more than a single instance. Therefore, an instance name is required to uniquely identify it.

    The Classify dialog box with example values in the Target environments and instance name fields.

API Analytics Impact

In the Pre-Crowd version of API Manager, all dashboards were organization-wide. In Crowd, each dashboard links to a particular environment.

If you had custom reports for your APIs before migrating, those custom reports would no longer work after you classify all your APIs.

Configuring Mule Servers with Environment Credentials (Advanced Classification: Optional)

You can use this configuration to track APIs that use environment credentials. This configuration requires a server restart.

The sections that follow help you classify your APIs depending on how you deployed proxies before migration.

Managing an API instance by using a Proxy deployed through API Manager

If your API was deployed in Runtime Manager:

  1. From API Administration, click the API Name of the API instance.

  2. Click Runtime & Endpoint Configuration > Save & Deploy.

  3. Select the Runtime version.

  4. Click Save & Apply.

If your API was deployed in an on-premises standalone runtime:

  1. From API Administration, click the API Name of the API instance.

  2. Click Runtime & Endpoint Configuration > Save & Deploy.

  3. Specify a runtime version for Mule Agent 1.9 and later.

  4. Click Save & Apply.

To update an existing server:

  1. Use SSH to access the standalone runtime server.

  2. Download the Runtime Agent 1.9 or later.

  3. Update the Gateway runtime agent.

  4. Restart the Gateway.

Managing an API instance by using a Basic Endpoint or a Proxy deployed through Runtime Manager

If your API was deployed in Runtime Manager:

  1. Navigate to Access Manager.

  2. Click Environments.

  3. Click the environment name you want to use.

  4. Copy the Client ID and Client Secret.

To update an application in Runtime Manager:

  1. Navigate to the proxy application in Runtime Manager.

  2. Click Settings.

  3. Click Properties.

  4. Change the values of the following properties to the values from the Environment:

    • Anypoint.platform.client_id

    • Anypoint.platform.client_secret

  5. Click Apply changes.

To update an application deployed in standalone Mule Runtime:

  1. Use SSH to access the standalone runtime server where the application is deployed.

  2. Download Runtime Agent 1.9.x.

  3. Update the Runtime Agent.

  4. Restart the Mule Runtime.

Other Deployments

This section explains the manual steps needed to prepare Mule Runtime to use API environments without updating the agent or registering the server with Runtime Manager.

Getting the environment client ID and secret:

  1. Navigate to Access Manager.

  2. Click Environments.

  3. Click the environment name that you want to use.

  4. Copy the Client ID and Client Secret.

Updating an application in Runtime Manager:

  1. Navigate to the proxy application in Runtime Manager.

  2. Click Settings.

  3. Click Properties.

  4. Change the values of the following properties to the values from the environment:

    • anypoint.platform.client_id

    • anypoint.platform.client_secret

Updating standalone runtimes:

  1. Use SSH to access the runtime server that you want to update.

  2. Edit the <mule_home>/<conf>/wrapper.conf file.

  3. Change the values of the following properties to the values from the environment:

    • anypoint.platform.client_id

    • anypoint.platform.client_secret

  4. Restart Mule Runtime.