Filtering by query string and request path in GraphQL via CloudFlare API

Filtering by query string and request path in GraphQL via CloudFlare API


0

is it possible to filter the data by path and query string in the GraphQL for CloudFlare request?

I want to achieve

Filtering by query string and request path in GraphQL via CloudFlare API

from the CloudFlare API.

What I came up with looks like below:

{
    viewer {
        zones(filter: { zoneTag: "MY_ZONE_ID" }) {
            httpRequestsAdaptiveGroups(
                limit: 10000
                filter: {
                    datetime_geq: "2023-10-16T00:00:00Z"
                    datetime_lt: "2023-10-17T00:00:00Z"
                    clientRequestHTTPHost: "my.domain.com"
                }
            ) {
                sum {
                    visits
                }
            }
        }
    }
}

I’ve used the schema given in https://pages.johnspurlock.com/graphql-schema-docs/cloudflare.txt, which says

clientRequestPath: "/my.file"
clientRequestQuery_like: "?my=query"

can be used, but the result is 0 when the above mentioned filters are used. The result is more than 0 when I remove the filters.

The files are accessed for sure, since I can see it from the CF Dashboard.

So I wonder, if filtering with query strings and path is really possible in GraphQL API?


Load 2 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *