Solved

Developer API for updating segmentation chart

  • 7 October 2022
  • 3 replies
  • 167 views

Userlevel 1
Badge

I’d like to programmatically update an event segmentation chart.  Specifically I’d like to either:

  1. Update the where filter in an event module OR
  2. Update the custom date of the Compare to past option in the Properties tab

Is this possible with the Amplitude developer APIs?  Thanks!

Edit: For context, I have a chart that shows data for the last N releases of our app.  As new releases are pushed out, I’d like to automatically update the chart to show the latest releases.  Right now, we need to manually update the chart for each release.

icon

Best answer by Saish Redkar 10 October 2022, 06:46

View original

3 replies

Userlevel 7
Badge +10

Hey @TristanEarl 

AFAIK, updating an existing chart isn’t supported via any available API endpoints.

The existing chart API endpoint will only give static results of an existing saved chart and not the ability to update and query again.

Also, I haven’t come across any parameters in the API which can mimic the Compare to past functionality yet.

Your best bet will be to use the event seg api endpoint and create the desired chart by applying the filters on the fly

Hope this helps.

Userlevel 1
Badge

Thank you @Saish Redkar.  Follow-up question:  Are there APIs for creating alerts on charts?  Specifically, using data retrieved from the event seg API that you mentioned, can I programmatically create an alert on that data?

Userlevel 7
Badge +10

I don’t think that kind of API is out there currently for alerts, but I can certainly see some value in making such an endpoint available.
You can write your own code on the retrieved data to create some alerting triggers for now.

Reply