0% found this document useful (0 votes)
57 views

DIY Exercise 5-2 - Use An API Implementation As Its Own Proxy

The document describes configuring a Mule application to manage its own API proxies by enabling autodiscovery. The steps are: 1. Configure the Mule application in Anypoint Studio to include autodiscovery configuration. 2. Redeploy the Mule application to CloudHub, passing the Anypoint Organization client credentials. 3. Change the API's managing type in API Manager to "Basic Endpoint". 4. Test that requests to the implementation URL are now enforced by API policies by making requests until the SLA limit is exceeded.

Uploaded by

Rakkammal Rama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

DIY Exercise 5-2 - Use An API Implementation As Its Own Proxy

The document describes configuring a Mule application to manage its own API proxies by enabling autodiscovery. The steps are: 1. Configure the Mule application in Anypoint Studio to include autodiscovery configuration. 2. Redeploy the Mule application to CloudHub, passing the Anypoint Organization client credentials. 3. Change the API's managing type in API Manager to "Basic Endpoint". 4. Test that requests to the implementation URL are now enforced by API policies by making requests until the SLA limit is exceeded.

Uploaded by

Rakkammal Rama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DIY Exercise 5-2: Use an API implementation as its own proxy

Time estimate: 1 hour

Objectives
In this exercise, you configure a Mule application that has already deployed to CloudHub to manage its
own API proxies. You will:
• Configure a Mule application to enable autodiscovery for API Manager.
• Redeploy the Mule application to CloudHub.
• Test that the implementation URL is now enforcing API policies set in API Manager.

Scenario
The Accounts API has been implemented and deployed to CloudHub. Central IT has notified you that
they need more vCores allocated to another project and you must shut down the API proxy that you just
deployed in exercise 5-1.

In order to continue to enforce the current API policies, you now need to configure your implementation
to enforce the API policy set in API Manager. This is referred to as configuring a basic endpoint as a
managed API instance and can be achieved through enabling the Mule application (the API
implementation) to use autodiscovery.
Note: To complete this exercise, you must have completed exercise 5-1.

Enable autodiscovery for the Mule application


Use your solution from exercise 5-1. In Anypoint Studio, configure your Mule application to include
autodiscovery. Refer to the autodiscovery configuration documentation
here: https://docs.mulesoft.com/api-manager/v/2.x/api-auto-discovery-new-concept.

Modify the RAML spec in your Mule application to support SLA policies.

Redeploy the Mule application


Redeploy the Mule application and ensure that the Anypoint Organization client_id and client_secret
are passed to the Mule application.

Reconfigure the API in API Manager


Return to the API in API Manager and change the Managing type to Basic Endpoint.

Test the API implementation

1
Verify that the endpoints are now managed by the implementation by using a web client to make
multiple requests to the implementation URL until the SLA limit is exceeded.
Note: Remember to also send values for the type query parameter and the Requester-ID header with
the requests.

Verify your solution


Load the solution /files/module05/accounts-mod05-deploy-autodiscovery-solution.jar (in the
MUFundamentals4.x DIY Files zip that you can download from the Course Resources)
and compare your solution.

You might also like