Query Basics
The Query API returns aggregated metrics based on how you group the data. Every query requires:Group By Options
Time Granularity
Use
ALL for totals, other values for trend analysis.
Sorting
Sort results by any numeric field:ASC, DESC
Filtering
By Entity IDs
Filter results by related entities:topicIds works with both groupBy=SESSION and groupBy=END_USER. Other entity filters only work with groupBy=SESSION.