Skip to content
Start here

Run a GraphQL aggregation over events

POST/accounts/{account_id}/cloudforce-one/events/graphql

Runs a GraphQL aggregation query over events. Supports grouping by multiple fields, date range filters, and aggregation across datasets.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Cloudforce One WriteCloudforce One Read
Path ParametersExpand Collapse
account_id: string

Account ID.

ReturnsExpand Collapse
data: optional unknown
errors: optional array of unknown

Run a GraphQL aggregation over events

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cloudforce-one/events/graphql \
    -X POST \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "data": {},
  "errors": [
    {}
  ]
}
Returns Examples
{
  "data": {},
  "errors": [
    {}
  ]
}