API Proxy – Creating proxy service in API Manager

 

MuleSoft provide both API Management and Development platform for APIs. In any Organization there can be legacy web services which are still consumable but are not as advance as today’s service e.g. Security, Threat detection, HTTPS and other feature. API Manager provide you an out of the box feature to create proxy web service on the go and which can sit before the actual web service and in this way a legacy service can be accessed in more advanced way.

It can provide different features which are not there with the legacy web services like API monitoring, applying different OOTB policies and other management tools.

Think Organization have below legacy service which they want to share with their vendors/client

https://gorest.co.in/

will use below GET API for testing

https://gorest.co.in/public-api/users?first_name=john&_format=json&access-token=1KEOnDHy_8dsAYJHmQv9Z9I6Ff1VnjPqb72G

 

Goto API manager and click Manage API

Create proxy service

 

Select Create new API and select HTTP API as Asset type

Create proxy service

 

Select “Endpoint with Proxy”, Cloudhub and Implementation URL and Click Save

Create proxy service

 

This will create API Manager Configuration and initially it will show API Status Unregistered

Create proxy service

 

Now go to Deployment Configuration and select the mule runtime and proxy application name and click Deploy

Create proxy service

 

 

Popup will come and show the progress and once complete, click close

Create proxy service

 

API Status is change to Active

 

We can see the proxy application in runtime manager

 

Now we will construct the new URL

 

To construct the URL we should consider the implementation URL also – https://gorest.co.in/public-api

Proxy URL – http://myuser.us-e2.cloudhub.io will be equal to implementation URL

And then we add the rest of the URL

http://myuser.us-e2.cloudhub.io/users?first_name=john&_format=json&access-token=DjHM4_P-r2IWgrwXSH7-OGRurj-xnaC4G1uU

 

Now we can take the advantage of API Manager Out of the box feature without implementing them in legacy web services

 

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Shani Jaiswal
Shani Jaiswal
1 year ago

While implementing this use case , got this error :
To allow requests to /18.222.131.84, add the following to your environment configuration:

config.hosts << "/18.222.131.84"

Please guide me on this .

Last edited 1 year ago by Shani Jaiswal
seshu
3 months ago

whats the exact definition of proxy server and proxy service???