On my dashboard I have a “segmentation by ‘order - create’” with a “group by” on “plan”. I get a graph and table like:
plan | date
planA | 45
planB | 53
…
I am trying to retrieve this using the API, but can’t quite figure out how to do it. I tried the following:
https://amplitude.com/api/2/events/segmentation?e={"event_type":"order - create","group_by":-{"type":"event","value":"plan"}]}&i=30&m=totals&start=20230101&end=20230131
I get the aggregate total, not the breakdown by planA, planB, etc. What am I doing wrong? How do I retrieve the table as on the dashboard? I believe I can create a chart and query the chart, but I want to dynamically select the date range.
Thanks.