Skip to main content
← Back to list
01Issue
FeatureIn ProgressExtensions
Assigneesstack72

Relationships

#1421 Cloudflare: expose GraphQL Analytics API (httpRequestsAdaptiveGroups / client-IP request analytics)

Opened by derek · 7/26/2026

Problem

No @swamp/cloudflare/* model type exposes the Cloudflare GraphQL Analytics API (httpRequestsAdaptiveGroups and sibling adaptive datasets). The official Cloudflare extensions cover zones, DNS, WAF, workers, cache, logpush job config, tokens, spectrum, etc. — but not the request-analytics query surface. @webframp/cloudflare only offers cache.get_analytics (cache hit/miss) and waf.get_security_events, neither of which answers request-analytics questions.

Concretely I needed "top client IPs (and URL paths) hitting a given host, filtered by edgeResponseStatus, over a time window" — the real client IP, which only exists at Cloudflare (origin/S3 access logs behind a proxied host see only Cloudflare edge IPs). The only source is httpRequestsAdaptiveGroups with dimensions clientIP, clientRequestPath, clientRequestHTTPHost, edgeResponseStatus, clientCountryName and the count / avg(sampleInterval) metrics.

Proposed solution

An official model type (e.g. @swamp/cloudflare/analytics) wrapping the zone-level GraphQL Analytics API — group-by dimension(s), filter (host/status/datetime), orderBy, limit — returning normalized rows. Surfacing the plan-dependent constraints as typed errors would help every consumer: Free plans cap each query to a 1-day window, retain the per-client-IP dataset only ~8 days, and gate some dimensions (clientAsn is Enterprise-only).

Current workaround

I hand-rolled a local extension model that POSTs the GraphQL query directly, paging one UTC day at a time and storing a daily snapshot as versioned model data to beat the 8-day retention. It works, but this API wrapper belongs in an official extension rather than each user re-implementing fetch against the GraphQL endpoint.

Suggested home: @swamp/cloudflare/logs (or a new @swamp/cloudflare/analytics).

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 8 MOREREVIEW+ 1 MOREIMPLEMENTATION

In Progress

7/26/2026, 11:03:33 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/26/2026, 10:40:37 PM

Sign in to post a ripple.