Skip to main content

CDN

CDN control-plane. Multi-provider (cloudflare | cloudfront | fastly | direct | stub). Cloudflare purge is capped at 30 URLs/call and requires CLOUDFLARE_ZONE_ID + CLOUDFLARE_API_TOKEN (env-only); absent creds fall back to 'direct' mode (no upstream purge call, never raising). generate_cache_key = sha256 first-32 hex of url + sorted vary headers.

  • Group: Content & media
  • Contract: contracts/cdn/v1/openapi.yaml
  • Public access: none — internal-only capability. It is NOT exposed on the public API gateway (https://api.vagarylabs.com); it is reachable only inside the fleet (container/tailnet) by first-party callers. There is no customer-facing endpoint to call.

Endpoints

MethodPathSummary
GET/healthliveness + provider (open)
GET/metricsPrometheus text (open)
POST/v1/cdn/purgepurge CDN cache (by paths, capped 30/CF-call, or purge_all)
POST/v1/cdn/configureset provider + base_url (cloudflare without creds falls back to direct)
GET/v1/cdn/statsprovider + recent purge stats
GET/v1/cdn/url-rewritethe CDN URL for an asset path
GET/v1/cdn/cache-keysha256[:32] cache key for a url + sorted vary headers

Schemas

No inline component schemas in this contract.

Generated by scripts/gen-capability-docs.py from contracts/cdn/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.