Skip to main content

Building an API Proxy with Apigee Edge

Hands-On Lab

 

Photo of Joseph Lowery

Joseph Lowery

Google Cloud Training Architect II in Content

Length

00:15:00

Difficulty

Beginner

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.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Building an API Proxy with Apigee Edge

Introduction

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.

Connecting to the Lab

  1. Navigate to https://cloud.google.com/apigee.
  2. Click the Try it free button.
  3. Create a free Apigee account.

Retrieve the Working Files

  1. In your terminal, clone the repo that contains the working files for the lab.
    cd ~/downloads   
    git clone https://github.com/linuxacademy/content-apigee-api-engineer-exam

Create a New API Proxy

  1. Navigate to Apigee in your web browser, and log in if you haven't already done so.
  2. On the Apigee dashboard page, click API Proxies.
  3. Click the + Proxy button.

Select a Proxy Type

  1. On the Type screen, select Reverse Proxy from the list of proxy types.
  2. Click the Use OpenAPI button.
  3. In the dialog, choose Upload file.
  4. Click the CLICK TO UPLOAD FILES button.
  5. Navigate to the cloned repo. Within the repo, open the create-api-proxy folder, and choose the OpenWeatherMapAPI.yaml file.
  6. Click Open.
  7. In the dialog, click Select.
  8. On the Create Proxy page, click Next.

Specify the Proxy Details

  1. On the Details screen, change the Proxy Name to LA-Weather.
  2. Change the Proxy Base Path to /v1/la-weather.
  3. Leave the remaining values set to their defaults, and click Next.

Set the Flows

  1. On the Flows screen, make sure the /weather GET flow is selected.
  2. Click Next.

Configure the Security Settings

  1. On the Security screen, select the Pass through (none) option.
  2. Leave the Add CORS header option unchecked.
  3. Click Next.

Choose the Virtual Hosts

  1. On the Virtual Hosts screen, make sure that the default and secure options are both selected.
  2. Click Next.

Build and Deploy the Proxy

  1. On the Build screen, in the Deploy Environments section, make sure that only the test option is selected.
  2. Click Build and Deploy.
  3. After the proxy is deployed, click the provided link on the Summary screen.

Conclusion

Congratulations, you've successfully completed this hands-on lab!