Changed
Response grouping forGET https://dashboard.dashsocial.com/reports/data is now controlled by two parameters:
aggregate_bysets the primary grouping dimension. Accepted values:
secondary_aggregate_byadds an optional second grouping dimension. It is now supported onreport_type=TOTAL_METRICandreport_type=GRAPH(previously stacked bars only).
aggregate_by in your request. If it is omitted, the endpoint falls back to a default that depends on the report type and the brands and channels in your request, so the grouping may not be what you want.
| Report type | Default aggregate_by |
|---|---|
STACKED_BAR_METRIC | BRAND |
GRAPH types | CHANNEL if more than one channel is requested; otherwise BRAND if more than one brand is requested; otherwise TOTAL |
Other types (e.g. TOTAL_GROUPED_METRIC) | the first available breakdown, usually CHANNEL |
What you need to update
-
Set
aggregate_byto the grouping your report needs. For a brand-and-channel breakdown, useaggregate_by=BRANDandsecondary_aggregate_by=CHANNEL. -
Read metrics from each entry. The path matches your grouping:
- With
secondary_aggregate_by:data[<aggregate_by>]["breakdowns"][<secondary_aggregate_by>]["metrics"]["<METRIC>"]["<CHANNEL>"] - Without it, the
breakdownslevel is dropped:data[<aggregate_by>]["metrics"]["<METRIC>"]["<CHANNEL>"]
<CHANNEL>is the channel name when the data is split by channel, otherwiseALL_CHANNELS. - With
Response structure: TOTAL_METRIC
TOTAL_METRIC, the innermost object is a single value.
Response structure: GRAPH
GRAPH, the innermost object is keyed by date.
Notes
A brand only includes a channel underbreakdowns if it has data for that channel. In the examples above, brand 2 returns Instagram only.
The two report types share the same structure. Only the innermost object differs: date-keyed values for GRAPH, a single value for TOTAL_METRIC.