Skip to content

Deleting Alerts

Delete alerts that are no longer needed.


Endpoint

DELETE /api/alerts/:id

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.

ALERT_ID="550e8400-e29b-41d4-a716-446655440000"

curl -X DELETE "https://your-shield-host:8080/api/alerts/$ALERT_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
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