Reverse API Proxy
What is a Reverse proxy?
It receives the request from the client, processes it, and calls the backend service to get the data that the client requests.
Send the response back to the client.
Scenario: The client sends a request message to the backend service to get the employee information according to its ID.
Apigee Implementation: Create a reverse API Proxy by using the backend service URL(target endpoint)
target endpoint: https://jsonplaceholder.typicode.com/users
Run the above endpoint in Postman by adding id:1
in the parameter below and see the output.
Click on API proxies
Click on CREATE NEW.
Click on Reverse proxy.
Add the details as shown below. And click on Next.
Click on Next by selecting the Security option as Pass-through as shown in the image.
select the environment (eval) where we are deploying this Proxy. As shown in the image. Click on Create and deploy
Click on Edit proxy.
We successfully created the Reverse proxy with the target endpoint (https://jsonplaceholder.typicode.com/users?id=1).
The client sent a request message including id: 1 in the query parameter to the API proxy. Then proxy hits the target(Backend service) and gets the data as requested by the client. And respond to the client with a response message.
request message: https://34.36.30.222.nip.io/reverseproxy?id=1
Subscribe to my newsletter
Read articles from Nainaz directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by