Skip to main content
Solved

help with group_by over the api


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.

Best answer by effem

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

View original
Did this topic help you find an answer to your question?

3 replies

Saish Redkar
Expert
Forum|alt.badge.img+10

Hey @effem 

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


  • Author
  • New Member
  • 1 reply
  • Answer
  • March 17, 2023

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


Jeremie Gluckman
Team Member
Forum|alt.badge.img+9

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings