Graphql api forbidden

I see the doc said:

Please use the new GraphQL Analytics API instead: https://developers.cloudflare.com/analytics/graphql-api/. It provides equivalent data and more features, including the ability to select only the metrics you need. Migration guide: https://developers.cloudflare.com/analytics/migration-guides/zone-analytics/.

https://api.cloudflare.com/#zone-analytics-properties

so i tried the graphql api with the demo on the doc

{
  "data": null,
  "errors": [
    {
      "message": "zone 'ba073ed4ab85015ad9be474ca06b827f' does not have access to the path",
      "path": [
        "viewer",
        "zones",
        "0",
        "httpRequests1mGroups"
      ],
      "extensions": {
        "timestamp": "2020-08-13T10:39:24.932562129Z"
      }
    }
  ]
}

code 200, but shows this error, and i have no idea what does this mean.

Are you at least on a Pro plan?

image

1 Like

oh i see.

is there a doc specify the schema?

Which schema?

https://developers.cloudflare.com/analytics/graphql-api should have everything.

Depending on your GraphQL client, it might auto-fetch the schema or there might be a button for triggering a schema fetch. After that you can view the graphql functions available.

For Insomnia:

1 Like

thx a lot