The API proxy is what Apigee is all about. It sits between any device or app making a request and the backend server or service that sends a response. Once an API proxy is created, a world of customization is available – but you have to create the proxy first. In this hands-on lab, we’ll do just that, working with a full-fledged OpenAPI specification as our base. We’ll use this proxy as a springboard for further hands-on labs, so this is an important first step.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Retrieve the Working Files
- In your terminal, clone the repo that contains the working files for this lab:
cd ~/downloads git clone https://github.com/linuxacademy/content-apigee-api-engineer-exam
- In your terminal, clone the repo that contains the working files for this lab:
- Create a New API Proxy
- From the Apigee dashboard, choose API Proxies.
- Click the + Proxy button, and select New Spec.
- Select a Proxy Type
- On the Type screen, choose Reverse Proxy from the list of types of proxies.
- Click the Use OpenAPI button.
- In the dialog, choose Upload file.
- Click the CLICK TO UPLOAD FILES button.
- Navigate to the cloned repo. Within the repo, open the
create-api-proxy
folder, and choose theOpenWeatherMapAPI.yaml
file. - In the dialog, click Select.
- From the Create Proxy page, click Next.
- Specify the Proxy Details
- On the Details screen, change the Proxy Name to LA-Weather.
- Change the Proxy Base Path to
/v1/la-weather
. - Leave the remaining values set to their defaults, and click Next.
- Set the Flows
- On the Flows screen, make sure the
/weather GET
flow is selected. - Click Next.
- On the Flows screen, make sure the
- Configure the Security Settings
- On the Security screen, select the Pass through (none) option.
- Leave the Add CORS header option unchecked.
- Click Next.
- Choose the Virtual Hosts
- On the Virtual Hosts screen, make sure that the
default
andsecure
options are both selected. - Click Next.
- On the Virtual Hosts screen, make sure that the
- Build and Deploy the Proxy
- On the Build screen, in the Deploy Environments section, make sure that only the
test
option is selected. - Click Build and Deploy.
- After the proxy is deployed, click the provided link on the Summary screen.
- On the Build screen, in the Deploy Environments section, make sure that only the