Contact Free trial Login

Quick start: Manage an API and set up a proxy for it

In this walkthrough, we are showing how to create an API that can be managed through API Manager and set up a proxy for it that runs in CloudHub.

Creating an API asset in Exchange

In order to have an API that can be managed through API Manager, the first step consists in creating an API asset in Anypoint Exchange.

  1. Go to Anypoint Exchange https://anypoint.mulesoft.com/exchange

  2. Click in New Asset button

    getting started proxy new asset button
  3. In Publish New Asset view, choose the asset type and an asset name. In case the asset type is RAML, OAS or WSDL, the corresponding associated file has to also be specified.

    getting started proxy new asset view
  4. Click on Publish button

Now, we have successfully created an API asset in Exchange.

Managing the API from API Manager

Next step consists in importing the created asset to API Manager, so the API can be managed as in deploy and download proxies, apply policies, configure access to it and more.

Follow this steps in order to import your API in API Manager:

  1. In the API Administration Dashboard click in Manage API > Manage API from Exchange

    manage-api-from-exchange
  2. In the next screen, you have to complete the following fields:

    editing-api
    • API Name: Type the first characters of the API name (The same name you chose when you created your asset in Exchange), and then API Manager displays APIs to choose from. Select the API one that was recently created in Exchange.

    • Asset Type: For this example we are going to use HTTP, but you can also choose to create a RAML/OAS or WSDL API.

    • API Version: Available versions in Exchange.

    • Managing Type: You may choose between Basic Endpoint or Endpoint with Proxy. Here we are using the endpoint with proxy.

    • Implementation URI: Enter the URL where the API implementation resides. For this example we are using http://my-implementation.company.com

      If you are managing an API for Mule 4 or above, please make sure you select the checkbox. In this example, we are creating the API for Mule 4.

      If you need further configuration, you may want to click in Advanced Options, and fill in the options available.
  3. Click on Save.

After that, the API settings view is shown with the current information of the recently imported API.

created-api-in-admin-dashboard

So far, we have created an instance of an API Specification that can now be managed.

Configure and Deploy a Proxy to Cloudhub

Deploying an API Proxy to CloudHub lets you quickly protect your API implementation without having to worry about the infrastructure details. We do all the hard work for you, so now let’s do this final step:

  1. In the API Settings view, make sure your Proxy deployment target configuration is set to CloudHub

  2. Scroll down until you hit Deployment Configuration

    getting started proxy deployment config
  3. In Runtime Version, select the runtime version you need, and set a name for your application

  4. Finally, click on deploy.

Once you see the following pop-up, then your API proxy is successfully running in a CloudHub instance.

getting started proxy success deployment

Congratulations! You’ve just set up your first managed API.