I find the developer page for Cloudflare Stream Analytics is insufficient. It does not clearly state all arguments/limitations to the API request. Rather, it gives only a single example for 1 videoId.
Please work to make this page more comprehensive and complete.
Specifically, I want to generate a monthly report of all metrics associated with all videos my site has uploaded to Cloudflare Stream with the report containing 1 row of metrics for each videoId hosted. I want to bill my users based on the same billing data that Cloudflare Stream is billing me. So, I want all data used to compute my Cloudflare Stream monthly charges. I will then run further analysis over this data to bill my individual users based on the charges their videos generated in the month. I also want to show the user the individual metrics for each video they uploaded to my site in the individual invoices.
Agreed. The Cloudflare Stream Analytics documentation [developers.cloudflare.com/stream/analytics] is terribly sparse. It is far from complete and looks abandoned. I(t references sections of it’s document that don’t exist. For example, the Analytics Request Structure section states "
filters used to filter rows by one or more dimensions (see Filters section below)"
There is no “Filters section below”, or anywhere on that page or menu structure, nor on the cloudflare v4 api site.
It’s not much to ask, for proper docuemtnation for a product that we are actually handing over money for.
It may be too late for you but this is now possible when Fetching bulk analytics.
You can query for one month duration and get the minutes streamed and number of plays for each video in one request.
I don’t know where these filters are actually documented, but I was able to expose the available Filters within Insomnia somehow. While the Filters are listed in the documentation, their camelCase names are not, making them difficult to use.
- clientCountryName: string!
ISO 3166 alpha2 country code from the client
Request date of the event
Request datetime of the event
- datetimeFifteenMinutes: Time!
Request datetime of the event, truncated to multiple of 15 minutes
- datetimeFiveMinutes: Time!
Request datetime of the event, truncated to multiple of 5 minutes
- datetimeHalfOfHour: Time!
Request datetime of the event, truncated to multiple of 30 minutes
Request datetime of the event, truncated to the hour
Request datetime of the event, truncated to the minute
Browser of the device used in playback
OS of the device used in playback
Device type used in playback
unique id for a video