How Can I Make a Long and Detailed Query?

Context: You want to use the API to make a long query that uses many text characters.

How To in v3 Analytics

For queries with query parameters that would exceed the HTTP GET specification limit of 230 characters, use a POST request and pass a JSON object in the request body.
[POST] /v3/analytics/reports
    "filters": "((device_type==\"desktop\")) AND ((country==\"us\"))",
    "metrics": "plays_requested,displays,video_starts",
    "limit": 12,
~$: curl -H "Content-Type: application/json" -d '{"report_type":"performance", "start_date":"2014-11-26", "end_date":"2014-12-04", "filters": "((device_type==\"desktop\")) AND ((country==\"us\"))", "metrics": "plays_requested,displays,video_starts", "sort":"plays_requested", "dimensions":"device_type", "limit": 12, "api_key":"(YOUR API KEY HERE)"}'



Was this article helpful?