name: plan-an-api-gateway-policy
description: Plans gateway routing, authentication, quotas, and resilience policies for API routes. Use when the user needs to enforce cross-cutting traffic rules at an API gateway.
domain: api-design
tags: [api-gateway, routing, traffic-policy]
triggers: ["api gateway policy", "plan gateway routing rules", "define api traffic policy"]
Plans gateway routing, authentication, quotas, and resilience policies for API routes
Purpose
Plans gateway routing, authentication, quotas, and resilience policies for API routes.
When to use
Use when the user needs to enforce cross-cutting traffic rules at an API gateway.
When NOT to use
Do not use this for internal function signatures; use software-engineering instead.
Inputs required
- The consumers and what they need
- The resources and the operations involved
- The versioning, auth and rate-limit policy
Procedure
- Inventory routes, consumers, upstream services, and trust boundaries.
- Define authentication, quota, transformation, and routing rules per route.
- Set timeouts, retry limits, payload limits, and circuit-breaker behavior.
- Normalize gateway failures into the API error format.
- Test each policy and assign ownership for rule updates and incident response.
Output contract
A documented contract with endpoints, payloads, error shapes and versioning rules.
Validation checklist
Safety notes
Never change an existing response shape without a version bump and a migration note.
Related skills
plan-an-api-deprecation
design-an-event-streaming-api
rate-limit-an-api-endpoint
1---2name: plan-an-api-gateway-policy3description: Plans gateway routing, authentication, quotas, and resilience policies for API routes. Use when the user needs to enforce cross-cutting traffic rules at an API4---5---6name: plan-an-api-gateway-policy7description: Plans gateway routing, authentication, quotas, and resilience policies for API routes. Use when the user needs to enforce cross-cutting traffic rules at an API gateway.8domain: api-design9tags: [api-gateway, routing, traffic-policy]10triggers: ["api gateway policy", "plan gateway routing rules", "define api traffic policy"]11---1213# Plans gateway routing, authentication, quotas, and resilience policies for API routes1415## Purpose1617Plans gateway routing, authentication, quotas, and resilience policies for API routes.1819## When to use2021Use when the user needs to enforce cross-cutting traffic rules at an API gateway.2223## When NOT to use2425Do not use this for internal function signatures; use software-engineering instead.2627## Inputs required2829- The consumers and what they need30- The resources and the operations involved31- The versioning, auth and rate-limit policy3233## Procedure34351. Inventory routes, consumers, upstream services, and trust boundaries.362. Define authentication, quota, transformation, and routing rules per route.373. Set timeouts, retry limits, payload limits, and circuit-breaker behavior.384. Normalize gateway failures into the API error format.395. Test each policy and assign ownership for rule updates and incident response.4041## Output contract4243A documented contract with endpoints, payloads, error shapes and versioning rules.4445## Validation checklist4647- [ ] Every error has a stable machine-readable code48- [ ] Pagination, filtering and idempotency are defined49- [ ] The contract is versioned and backward compatible5051## Safety notes5253Never change an existing response shape without a version bump and a migration note.5455## Related skills5657- `plan-an-api-deprecation`58- `design-an-event-streaming-api`59- `rate-limit-an-api-endpoint`