1. API PROXY AUTO DISCOVERY
WITH MULESOFT API GATEWAY
Vince Jason Soliza
2. Pre-requisites
• Anypoint Studio
– Download it here https://www.mulesoft.com/platform/studio
– Install Anypoint Studio plugin API gateway runtime 2.2.0
• API Proxy Project
– http://www.slideshare.net/VinceSoliza/soap-to-rest-api-proxy
3. When do we need Auto-Discovery
Functionality?
When building or modifying an API project in
Anypoint Studio, it will be easy for the
developers if the application is automatically
discovered or registered in Anypoint Platform
for APIs. For instance, having regular
deployments of the same API, this will save the
effort of typing the same information into the
web application every time and reduce the risk
of a human error to occur.
4. Where do we begin?
• We begin from what we left off in our previous topic SOAP To REST API
Proxy.
• Login to anypoint platform and then click the gear icon.
• In the organization menu, select the organization to show the
organization info. Copy the organization client_id and client_secret.
• See the API Status is currently unregistered.
5. Anypoint Studio
with API Gateway runtime
• Link anypoint studio to our organization.
• Open anypoint studio and go to preference.
• Expand Anypoint Studio then select Anypoint Platform for API
• Paste the client_id & secret then click validate.
6. Anypoint Studio
with API Gateway runtime
Now that we linked anypoint studio to our organization let’s add auto
discovery in our configuration.
• Open proxy.xml then click Configuration XML tab. Write this code just
above the flow.
<api-platform-gw:api id=“54233" apiName=“EchoRESTProxy" version=”1.0” flowRef="proxy" doc:name="API
Autodiscovery”>
</api-platform-gw:api>
xmlns:api-platform-gw=http://www.mulesoft.org/schema/mule/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
7. Anypoint Studio
with API Gateway runtime
• We can see through the logs that auto discovery is kicking in
INFO 2016-02-22 11:14:15,302 [main]
com.mulesoft.module.client.autodiscovery.AutoDiscoveryDeploymentListener: Source
http://192.168.11.27:8081/api/echo/v1/* registered to API EchoRESTProxy [54233], version 1.0 [56227], org
[a9d53ff2-1234-4a1f-8d1a-b19eb82612cc]
• See how it changed in API Manager. The API Status is now Active.
8. Summary
The automatic discovery and registration of your API on
the Anypoint Platform occurs when you deploy the
applications to an API Gateway that is paired with your
Anypoint Platform organization. While you can also
register your APIs using the Anypoint Platform web
application or its API, the API auto-discovery feature
gives you an additional option for registering API
endpoints quickly and efficiently. It’s particularly useful
when you’re regularly deploying new versions of the
same API, saving you from the effort of having to type
the same information into the Web application every
time and minimizing the risk of human error.
https://docs.mulesoft.com/anypoint-platform-for-apis/api-auto-discovery
This template can be used as a starter file for presenting training materials in a group setting.
Sections
Sections can help to organize your slides or facilitate collaboration between multiple authors. On the Home tab under Slides, click Section, and then click Add Section.
Notes
Use the Notes pane for delivery notes or to provide additional details for the audience. You can see these notes in Presenter View during your presentation.
Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)
Coordinated colors
Pay particular attention to the graphs, charts, and text boxes.
Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.
Graphics, tables, and graphs
Keep it simple: If possible, use consistent, non-distracting styles and colors.
Label all graphs and tables.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Summarize presentation content by restating the important points from the lessons.
What do you want the audience to remember when they leave your presentation?