Skip to content

feat(api): Delete all alert instances by fingerprint (Issue #2817)#6467

Open
bayandzm wants to merge 1 commit into
keephq:mainfrom
bayandzm:feature/delete-alerts-api-2817
Open

feat(api): Delete all alert instances by fingerprint (Issue #2817)#6467
bayandzm wants to merge 1 commit into
keephq:mainfrom
bayandzm:feature/delete-alerts-api-2817

Conversation

@bayandzm

@bayandzm bayandzm commented May 12, 2026

Copy link
Copy Markdown

Implements Issue #2817 - Delete Alerts using an API for all timestamps altogether

Description

This PR adds a new DELETE endpoint /api/alerts/{fingerprint} that allows users to delete ALL alert instances (all timestamps) for a given fingerprint in a single request, instead of calling the existing delete endpoint for each timestamp.

Changes

  • Added new DELETE /api/alerts/{fingerprint} endpoint
  • Supports optional restore query parameter to restore all deleted alerts
  • Returns deleted_count in response indicating how many alert instances were deleted
  • Follows existing enrichment-based deletion pattern

Usage

# Delete all alert instances for a fingerprint
curl -X DELETE "https://your-keep-instance/api/alerts/{fingerprint}" \
  -H "Authorization: Bearer ***"

# Restore all deleted alert instances
curl -X DELETE "https://your-keep-instance/api/alerts/{fingerprint}?restore=true" \
  -H "Authorization: Bearer ***"

AI Assistance

This PR was implemented with AI assistance via Hermes Agent and OpenCode.

Closes #2817
Fixes #2817

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. API API related issues Feature A new feature labels May 12, 2026
@CLAassistant

CLAassistant commented May 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bayandzm bayandzm force-pushed the feature/delete-alerts-api-2817 branch from 7d5f6a9 to 7f4423d Compare May 13, 2026 13:52
@bayandzm

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 13, 2026
Implements issue keephq#2817 - Delete Alerts using an API for all timestamps altogether

- Added new DELETE /api/alerts/{fingerprint} endpoint
- Deletes all alert instances (all timestamps) for a given fingerprint in a single request
- Supports optional 'restore' query parameter to restore all deleted alerts
- Returns deleted_count in response
- Follows existing enrichment-based deletion pattern

AI-assisted implementation via Hermes Agent + OpenCode
@bayandzm bayandzm force-pushed the feature/delete-alerts-api-2817 branch from 305d189 to 8b057e3 Compare June 10, 2026 22:42
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 10, 2026
@bayandzm

Copy link
Copy Markdown
Author

Updated the PR with a clean single commit and fixed the CLA/email attribution issue. All checks are now passing.

Happy to adjust the endpoint shape if maintainers prefer extending the existing DELETE body with an optional lastReceived instead of adding a new path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API related issues Feature A new feature size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[➕ Feature]: Delete Alerts using an API for all timestamps altogether

2 participants