Hello Readers ! Hope you all are doing well . So today I am here with anew post and In this we’ll see how we can build an api proxy with apigee . API works as a security layer and it can also be used as a messenger that transfer data from one place to another .Have patient and stick with me till end and learn something new and interesting .
Let’s get started !!!
What is an API?
API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message or check the weather on your phone, you’re using an API.
API works as a security layer and it can also be used as a messenger that transfer data from one place to another .
What is an APIGEE ?
It is a proxy OR a platform for developing and managing API’s . APIGEE can also be defined as an API gateway provided by google to exchange data across cloud services and applications .
The following are the main parts of Apigee:
The APIs that you use to build, manage, and deploy your API proxies are known as apigee services.
A collection of containerized runtime services in a Kubernetes cluster that Google manages is called the apigee runtime. These services pass through and process all API traffic.
Apigee also makes use of the following other elements:
GCP services: Offers project management, analytics, logging, metrics, and identity management capabilities.
Back-end services: Used by your apps to give your API proxies runtime access to data.
What is API proxy?
The API proxy isolates the app developer from your backend service. Therefore you are free to change the service implementation as long as the public API remains consistent.
For example, you can change a database implementation, move your services to a new host, or make any other changes to the service implementation. By maintaining a consistent frontend API, existing client apps will continue to work regardless of changes to the backend.
Two types of Endpoints in API Proxy
Proxy Endpoint: Defines the way client apps consume your APIs. You configure the Proxy Endpoint to define the URL of your API proxy.
Target Endpoint: Defines the way the API proxy interacts with your backend services. You configure the Target Endpoint to forward requests to the proper backend service.
Building an API Proxy with APIGEE
Follow the below steps in order to build your first API Proxy with APIGEE .
Step 1 First setup your apigee environment by clicking on the Reference Link .
Step 2 Visit the apigee console at apigee.google.com . An apigee console window will appera as :
Step 3 Now , Click on the Develop —> API Proxies as :
Step -4 Once you have clicked API Proxies , a window will appear as :
Then Select CREATE NEW , this will prompt the proxy wizard and you will choose Reverse Proxy as :
Step 5 Next enter the following values for the proxy name , proxy base path , description and the target existing API as:
Then click next
Again Click next a window will appear like below and after that click on create .
Step 6 Choose to visit the API proxy list so that we can deploy are proxy by returing to Develop —> API Proxies again . Next also ensure that you are on your EVAL environment by looking at the top otherwise you can change it by using the dropdown .
Step 7 Click on the proxy , you have created and notice that under deployment the revision column shows as not deployed . After that click on deploy as :
A window will appear , choose one as the first version and environment as eval and click on deploy .
After that ,Click on confirm to confirm the deployment . Once your proxy is fully deployed you can test it .
Step 8 Now test your proxy using the command line terminal and use command :
curl -v -k https://EXTERNAL_IP/your_proxy_name
Note : You have to configured access to your proxies either internally or externally reference
Note: EXternal _ip you will get while setting up the apigee .
If the call succeeds , you will see the Hello, Guest ! , as the output in the terminal as you see in the above image .
So this is how you can build your api proxy with APIGEE .
Here in this blog we have learned how we can build an api proxy using apigee . Hope you all have find this blog helpful . If you have any query please do ping me .
Stay Tuned !!!
Happy Learning !!!