Migrate alert commands from deprecated Alert API to Notification API#13
Merged
Conversation
The Metabase pulse.api.alert namespace is deprecated. This migrates
all alert CRUD operations to use /api/notification endpoints instead:
- list() filters by payload_type=notification/card
- get/create/update use /api/notification/{id} endpoints
- delete archives via PUT with active=false (no DELETE on notifications)
- Alert params translated to notification payload/handlers format
- User-facing CLI interface remains identical
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update test expectations to verify the migrated AlertApi correctly translates calls to /api/notification endpoints with proper payload and handler translation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AlertApito use/api/notificationendpoints instead of deprecated/api/alertdeletenow archives viaPUT /api/notification/:idwithactive: false(no DELETE on notification API)alert list/show/create/update/delete) remains identicalmetabase-cli notificationfor full controlThe entire
metabase.pulse.api.alertnamespace is^:deprecatedin Metabase —POSTandPUTfor alerts go through notifications now.Test plan
metabase-cli alert list— verify alerts are listed from notification APImetabase-cli alert create --card <id> --condition rows— verify notification is createdmetabase-cli alert update <id> --condition goal— verify update worksmetabase-cli alert delete <id>— verify notification is archivedmetabase-cli alert show <id>— verify details are returned🤖 Generated with Claude Code