Cloudflare REST API End-of-Life: Complete GraphQL Migration Checklist

Cloudflare has been steadily migrating its analytics and reporting endpoints from the legacy REST API (v4) to its GraphQL Analytics API. While the core CRUD operations for DNS records, zones, and configuration remain on REST (and will for the foreseeable future), the analytics and reporting endpoints that many monitoring tools depend on are being sunset. Several legacy analytics REST endpoints were officially deprecated in late 2025, with full removal planned throughout 2026.

This guide provides a complete migration checklist for teams that need to move from deprecated REST analytics endpoints to Cloudflare's GraphQL API, along with example queries and testing strategies.

What Is Being Deprecated (and What Is Not)

It is critical to understand that Cloudflare is not deprecating its entire REST API. The v4 REST API for zone management, DNS records, WAF rules, Workers, and configuration endpoints remains fully supported. What is being deprecated are specific analytics and reporting endpoints that have GraphQL equivalents:

Deprecated REST EndpointGraphQL ReplacementRemoval Date
/zones/:id/analytics/dashboardhttpRequestsAdaptiveGroupsQ2 2026
/zones/:id/analytics/coloshttpRequestsAdaptiveGroups with colo filterQ2 2026
/zones/:id/dns_analytics/reportdnsAnalyticsAdaptiveGroupsQ3 2026
/zones/:id/firewall/eventsfirewallEventsAdaptiveQ2 2026
/user/load_balancers/pools/:id/healthloadBalancingRequestsAdaptiveGroupsQ3 2026
Important: If you are only using Cloudflare's REST API for DNS record management, zone configuration, or Workers deployment, no migration is needed. Those endpoints are stable and actively developed.

Architectural Differences: REST vs GraphQL

The shift from REST to GraphQL is not just a syntax change. It fundamentally changes how you query Cloudflare data:

Example Queries for Common Use Cases

HTTP Traffic Analytics (Replacing /analytics/dashboard)

query {
  viewer {
    zones(filter: {zoneTag: "YOUR_ZONE_ID"}) {
      httpRequestsAdaptiveGroups(
        filter: {
          datetime_gt: "2026-03-08T00:00:00Z"
          datetime_lt: "2026-03-09T00:00:00Z"
        }
        limit: 1000
        orderBy: [datetime_ASC]
      ) {
        dimensions {
          datetime
          clientCountryName
          clientRequestHTTPHost
        }
        sum {
          requests
          bytes
          cachedRequests
          cachedBytes
          threats
          pageViews
        }
        avg {
          sampleInterval
        }
      }
    }
  }
}

DNS Analytics (Replacing /dns_analytics/report)

query {
  viewer {
    zones(filter: {zoneTag: "YOUR_ZONE_ID"}) {
      dnsAnalyticsAdaptiveGroups(
        filter: {
          datetime_gt: "2026-03-01T00:00:00Z"
          datetime_lt: "2026-03-09T00:00:00Z"
        }
        limit: 100
        orderBy: [sum_queryCount_DESC]
      ) {
        dimensions {
          queryName
          queryType
          responseCode
        }
        sum {
          queryCount
        }
      }
    }
  }
}

Firewall Events (Replacing /firewall/events)

query {
  viewer {
    zones(filter: {zoneTag: "YOUR_ZONE_ID"}) {
      firewallEventsAdaptive(
        filter: {
          datetime_gt: "2026-03-08T00:00:00Z"
          action: "block"
        }
        limit: 50
        orderBy: [datetime_DESC]
      ) {
        action
        clientIP
        clientCountryName
        datetime
        source
        userAgent
        ruleId
        matchIndex
      }
    }
  }
}

Migration Checklist

Use this checklist to track your migration progress across your infrastructure:

Phase 1: Discovery and Audit

Phase 2: Build GraphQL Queries

Phase 3: Testing and Validation

Phase 4: Cutover

Rate Limits and Performance Considerations

Cloudflare's GraphQL API has different rate limiting than REST:

Common Migration Mistakes

The migration is straightforward for teams with a small number of analytics integrations. For larger organizations running Cloudflare across hundreds of zones with custom monitoring dashboards, budget two to four weeks for the full migration cycle. Start now — the Q2 2026 removal dates for HTTP and firewall analytics are less than three months away.