Fastly: API Design — Configuration & Purge
Docs-backedREST API at api.fastly.com with clean resource model. Service configuration uses a version-based workflow: clone current version, modify, validate, activate. This is more complex than Cloudflare's API-immediate model but prevents configuration errors from going live without validation. Cache purge is the star endpoint: POST to /service/{service_id}/purge/{surrogate_key} or /purge/{url} with near-instant global propagation. Real-time stats API returns per-second metrics for hit rate, bandwidth, errors, and request counts. The Stats API supports historical queries with time-range filtering. Domain and backend management follow standard CRUD patterns. VCL snippet management enables custom edge logic. Edge Dictionaries provide key-value stores updatable via API without version activation.