Skip to content

[server] remove deprecated insights endpoint by alert id#1791

Merged
cyrilou242 merged 2 commits intomasterfrom
te-xx-cleanup-insights-endpoint
Feb 18, 2025
Merged

[server] remove deprecated insights endpoint by alert id#1791
cyrilou242 merged 2 commits intomasterfrom
te-xx-cleanup-insights-endpoint

Conversation

@cyrilou242
Copy link
Contributor

@cyrilou242 cyrilou242 commented Feb 11, 2025

Frontend currently calls alerts/insights endpoint via 2 ways:

  1. On create alert page, when user has selected upto granularity, this API is called with alert configuration (without id) to get insights
  2. On alert details page, this API is called with just the alert Id.

This PR ->

  1. Cleans up deprecated alerts/{id}/insights endpoint
  2. Handles both cases in alerts/insights endpoint
    a -> if the id is set, id takes precedence, we fetch the entity from the db
    b -> if the id is not set, we use the fields passed in the payload

@vercel
Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdeye ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 10:34am

@anshul98ks123 anshul98ks123 force-pushed the te-xx-cleanup-insights-endpoint branch from 83b9758 to 44c4538 Compare February 14, 2025 10:30
@cyrilou242 cyrilou242 merged commit 19cbe9c into master Feb 18, 2025
13 of 14 checks passed
@cyrilou242 cyrilou242 deleted the te-xx-cleanup-insights-endpoint branch February 18, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants