Skip to main content

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.

Hey @effem 

Can you share the API response and the chart breakdown you are trying to replicate?


nvm. reverse engineered it from the calls the dashboard is making.


Thanks @Saish Redkar and @effem. Do you need additional support here?


Reply