GraphQL Zone Domain

Hi,

I’m trying to do a simple query that returns all the zones in an account along with the domain in each zone. Since the previous API Analytics is deprecated, I need to re-write our Analytics to use the new GraphQL API against all our zones.

Here’s my query so far:

{
  viewer {
    accounts(
      filter: { accountTag: "xxxxxx" }
    ) {
      zones(limit:10 ){
        zoneTag
      }
    }        
  }
}

I can’t seem to find a “name” attribute like there is in the main API: Cloudflare API v4 Documentation. Can anyone please let me know if this exists under a different method?

Thanks!
Casey.

The GraphQL API does not currently return zone names, just tags. You’ll have to keep using the main API to get zone info.

I just published a page that describes all types/fields for the Cloudflare GraphQL API, as it exists right now:

Hope that helps,
- John

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.