Apigee Hands-On¶
A practical, deploy-and-curl introduction to Apigee — Google Cloud's API
management platform. Every lab ships as a real API proxy bundle you can deploy
to an Apigee evaluation org in minutes and exercise with curl.
Learning by doing
Reading about policies is not the same as watching a VerifyAPIKey reject
a request with a 401. Each lab ends with commands that produce visible
output — run them, break things on purpose, and use the Trace tool to
watch execution step through your flows.
How to use this guide¶
Every page follows the same learning loop, so you know what to expect:
- Objectives and prerequisites at the top — know what you're aiming for.
- Predict boxes before commands — guess first, then run. Wrong guesses teach more than right ones.
- Line-by-line annotations — hover the + markers in code blocks to see what each line does and why it is there.
- Experiments that break things on purpose.
- Check yourself questions at the end — answer from memory before opening them. Revisit them a few days later.
Suggested order: Core Concepts → Getting Started → Proxy Anatomy → Bundle Walkthrough → Labs 1–7 → Debugging → Advanced Topics.
Where Apigee sits¶
Apigee is a reverse proxy and API management layer that fronts your backend services. Clients call Apigee; Apigee applies policies (security, traffic shaping, mediation) and forwards to your target.
The backend never sees the client directly — which is what makes Apigee the right place to centralize cross-cutting concerns instead of re-implementing them in every service.
What you'll build¶
Across the labs you'll assemble one proxy — labs-proxy — that front-ends a
public mock target (mocktarget.apigee.net)
and progressively adds:
| # | Lab | Policies exercised | You leave able to... |
|---|---|---|---|
| 1 | First proxy | AssignMessage |
Deploy a proxy bundle and trace a request end-to-end |
| 2 | API key security | VerifyAPIKey |
Create products/apps, issue keys, reject anonymous calls |
| 3 | OAuth & JWT | OAuthV2, GenerateJWT, VerifyJWT |
Issue access tokens and verify signed JWTs at the edge |
| 4 | Traffic management | SpikeArrest, Quota |
Rate-limit per app and absorb traffic bursts |
| 5 | Mediation | ExtractVariables, JavaScript, ServiceCallout |
Reshape requests/responses and call out to other services |
| 6 | Caching & faults | ResponseCache, RaiseFault, FaultRules |
Cache GETs and return consistent error payloads |
| 7 | CORS & KVM | AssignMessage, KeyValueMapOperations |
Handle browser preflights and externalize per-env config |
The complete, deployable bundle lives in examples/labs-proxy/ in
this repository — deploy it once, then each lab exercises a different part of
it with curl and Trace.
Prerequisites¶
- An Apigee evaluation org (free, 60 days) — see Getting Started to provision one.
curl,jq, andapigeecliinstalled locally.- ~15 minutes per lab.
No local emulator
Apigee X does not run locally. The eval org is the hands-on path — the
labs assume you have one provisioned and reachable via apigeecli.
Reference material¶
- Core concepts — org/env/proxy/product vocabulary, policy skeleton, variables, conditions.
- Bundle walkthrough — every line of the real bundle, annotated.
- Debugging — a repeatable method plus a failure catalogue.
- Advanced topics — shared flows, threat protection, TLS, logging, analytics, hardening and production checklists.
- Deep dives: OAuth grants & scopes, cache policies, access control & routing, OpenAPI-first, testing, platform & operations, OWASP API Top 10.
- Cheat sheet and Glossary.
- Proxy anatomy — how bundles, endpoints, and flows fit together. Read this before Lab 1, or skim it and come back when confused.
- Policy cookbook — copy-paste XML for the policies you'll use most.
- Deploy & CI/CD — promotion across environments and deploying proxies from a pipeline.