Deleting Alerts
Delete alerts that are no longer needed.
Endpoint
Permanently deletes an alert configuration.
Authentication
Requires API Key with Policy Definition permission.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
UUID | Alert ID to delete |
Response
Returns 204 No Content on successful deletion.
Behavior
When deleting an alert:
- Permanent deletion - Cannot be undone via API
- Alert logs retained - Historical logs of triggered alerts are preserved
- No cascade - No impact on other configurations
Examples
Delete an Alert
Delete an alert by its ID.
import requests
BASE_URL = "https://your-shield-host:8080"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
alert_id = "550e8400-e29b-41d4-a716-446655440000"
response = requests.delete(f"{BASE_URL}/api/alerts/{alert_id}", headers=HEADERS)
if response.status_code == 204:
print("Alert deleted successfully")
const axios = require('axios');
const BASE_URL = 'https://your-shield-host:8080';
const HEADERS = { 'Authorization': 'Bearer YOUR_API_KEY' };
const alertId = '550e8400-e29b-41d4-a716-446655440000';
const response = await axios.delete(`${BASE_URL}/api/alerts/${alertId}`, { headers: HEADERS });
if (response.status === 204) {
console.log('Alert deleted successfully');
}
Error Responses
| Status Code | Description |
|---|---|
401 |
Invalid or expired API key |
403 |
Insufficient permissions (requires Policy Definition) |
404 |
Alert not found |
Important Notes
- Consider disabling instead - Use enable/disable to temporarily stop alerts
- Alert logs preserved - Historical execution logs remain accessible
- Cannot be restored - Deleted alerts cannot be recovered via API
Related Topics
- Enable/Disable Alert - Temporarily disable instead of deleting
- Create Alert - Create a new alert to replace the deleted one
- List Alerts - Query remaining alerts
- Alert Logs - View historical trigger logs