Apigee X Components
API Proxies
The fundamental building block — a facade that sits between the consumer and backend:
<!-- Example: apiproxy/proxies/default.xml -->
<ProxyEndpoint name="default">
<PreFlow>
<Request>
<Step><Name>Verify-API-Key</Name></Step>
<Step><Name>Spike-Arrest</Name></Step>
<Step><Name>Quota</Name></Step>
</Request>
</PreFlow>
<Flows>
<Flow name="GetProducts">
<Condition>(proxy.pathsuffix MatchesPath "/products") and (request.verb = "GET")</Condition>
<Request>
<Step><Name>Cache-Lookup</Name></Step>
</Request>
<Response>
<Step><Name>Cache-Populate</Name></Step>
</Response>
</Flow>
</Flows>
<PostFlow>
<Response>
<Step><Name>Add-CORS</Name></Step>
</Response>
</PostFlow>
<HTTPProxyConnection>
<BasePath>/v1/products</BasePath>
</HTTPProxyConnection>
<RouteRule name="default">
<TargetEndpoint>default</TargetEndpoint>
</RouteRule>
</ProxyEndpoint>
Key Policies
| Policy | Category | Purpose |
|---|---|---|
VerifyAPIKey |
Security | Validates API key in request header/query |
OAuthV2 |
Security | Generates/validates OAuth 2.0 tokens |
SpikeArrest |
Traffic | Prevents sudden traffic bursts (e.g., 10ps) |
Quota |
Traffic | Enforces usage limits (e.g., 1000 calls/day) |
ResponseCache |
Performance | Caches backend responses to reduce latency |
AssignMessage |
Mediation | Modify headers, query params, payload |
JSONToXML / XMLToJSON |
Mediation | Format transformation |
JavaCallout |
Extension | Custom Java code for complex logic |
JavaScript |
Extension | Inline JS for lightweight processing |
RaiseFault |
Error Handling | Return custom error responses |
MessageLogging |
Observability | Log to Cloud Logging / external SIEM |
Environments & Deployment
Organization (org)
├── Environment: dev
│ ├── API Proxy: products-api (rev 5)
│ └── API Proxy: orders-api (rev 3)
├── Environment: staging
│ ├── API Proxy: products-api (rev 4)
│ └── API Proxy: orders-api (rev 3)
└── Environment: prod
├── API Proxy: products-api (rev 3) ← stable
└── API Proxy: orders-api (rev 2)