Hi,
I’m building an application around Cloudflare stream and I have some troubles with the Fetching bulk analytics documentation.
The cURL request provided just does not work : (I of course changed the $TOKEN and $ACCOUNT_ID and the authentication is O.K.)
curl --request POST \--url https://api.cloudflare.com/client/v4/graphql \--header 'content-type: application/json' \--header 'Authorization: Bearer $TOKEN' \--data '{"query":"query {\n viewer {\n accounts(filter:{\n accountTag:\"$ACCOUNT_ID\"\n\n }) {\n videoPlaybackEventsAdaptiveGroups(\n filter: {\n date_geq: \"2020-09-01\"\n date_lt: \"2020-09-25\"\n }\n orderBy:[uid_ASC]\n limit: 10000\n ) {\n count\n sum {\n timeViewedMinutes\n }\n dimensions{\n uid\n }\n }\n }\n }\n}\n\n"}'
However, I get this error :
{
"data": null,
"errors": [{
"message": "failed to recognize JSON request: 'invalid character '5' after object key:value pair'",
"path": null,
"extensions": {
"timestamp": "2021-03-14T19:12:21.038542487Z"
}
}]
}
And when I try to validate the GraphQL from the exemple, I also have an error :
I just can’t get around this problem. Any help will be greatly appreciated!