
Analytics API Display Plays Per Day For a Given Media ID
I am trying to use the new analytics API to view how many plays occurred each day in the last month for a given media id. I am running into an issue where i am required to supply the metrics with an operation of sum on plays resulting in one row being returned instead of each day having its own data row. Any suggestions? Current CURL looks like so:
curl -X POST https://api.jwplayer.com/v2/sites/\SECRET/analytics/queries/ \
-H 'Authorization: SECRET’ \
-H 'Content-Type: application/json' \
-d '{"start_date" : "2017-09-01", "end_date" : "2017-09-29", "dimensions" : ["eastern_date", "media_id"], "filter" : [ { "field" : "media_id", "operator" : "=", "value" : [ “SECRET” ] } ], "include_metadata": 1, "metrics" : [{ "operation" : "sum", "field" : "completes" },{ "operation" : "sum", "field" : "plays" }], "page" : 0, "page_length" : 100}'
Thanks!