Solved

How to get EventType through Dashboard Rest Api

  • 26 February 2021
  • 3 replies
  • 347 views

Badge

Hi,

Get JSON results from any existing (saved) chart by chart ID.

GET https://amplitude.com/api/3/chart/CHART_ID_HERE/query

There is no EventType in the obtained result, but only one eventIndex. How do I obtain the corresponding EventType?

 

 

icon

Best answer by Saish Redkar 26 February 2021, 17:28

View original

3 replies

Userlevel 7
Badge +10

Hey @yingjie.duan.

You are correct. The current result set for the https://amplitude.com/api/3/chart/CHART_ID_HERE/query endpoint doesn’t return the eventType used for that given event segmentation chart. 

However, if you query a user composition chart in this manner, the result set includes the name of user property which was used in that chart. eg.  u'seriesLabels': [u'gp:<yourCustomUserPropertyName']

Also, the documentation says that “Responses will vary depending on the chart type.” 

I’m curious to know your use case for using this particular endpoint. I have personally used the GET https://amplitude.com/api/2/events/segmentation endpoint to build some custom time series raw data points for some of my projects.

 

Badge

Hi @Saish Redkar 

Thank you for your answer. We want to monitor these eventtypes, and then send reminder emails if they exceed a certain limit.

 

Userlevel 7
Badge +10

Happy to help, @yingjie.duan !
You can set custom monitoring alerts for Amplitude charts and trigger emails based on your alert conditions. This is a paid add on for the Growth and Enterprise customers. You can read more on the Insights feature here.

Reply