Skip to main content

Delete Notifications

Deleting notifications in Nexla allows you to remove alerts that are no longer relevant or needed, helping you maintain a clean notification environment and focus on current operational issues.

Deletion Overview​

Notification deletion is useful for removing resolved issues, outdated alerts, and notifications that no longer require attention, helping you maintain an organized and efficient monitoring system.

Delete Individual Notifications​

Remove specific notifications when they are no longer needed.

Delete Endpoint​

To delete a specific notification:

DELETE /notifications/{notification_id}
Delete Notification: Request
DELETE /notifications/5007

Delete Response​

A successful deletion returns a confirmation message:

Delete Notification: Response
{
"status": "success",
"message": "Notification deleted successfully",
"deleted_id": 5007
}

Bulk Delete Notifications​

Remove multiple notifications simultaneously for efficient cleanup.

Bulk Delete Endpoint​

To delete multiple notifications:

DELETE /notifications/bulk_delete
Bulk Delete: Request
DELETE /notifications/bulk_delete

{
"notification_ids": [5007, 5008, 5009]
}

Bulk Delete Response​

Bulk deletion returns confirmation of all deleted notifications:

Bulk Delete: Response
{
"status": "success",
"message": "Notifications deleted successfully",
"deleted_count": 3,
"deleted_ids": [5007, 5008, 5009]
}

Conditional Deletion​

Delete notifications based on specific criteria and conditions.

Delete by Criteria​

Delete notifications matching specific criteria:

Delete by Criteria: Request
DELETE /notifications/conditional_delete

{
"criteria": {
"read": true,
"level": "INFO",
"resource_type": "SOURCE",
"created_before": "2023-01-01T00:00:00.000Z"
}
}

Conditional Delete Response​

Conditional deletion returns summary of deleted notifications:

Conditional Delete: Response
{
"status": "success",
"message": "Conditional deletion completed",
"deleted_count": 45,
"criteria_applied": {
"read": true,
"level": "INFO",
"resource_type": "SOURCE",
"created_before": "2023-01-01T00:00:00.000Z"
}
}

Deletion Considerations​

Understanding when and how to delete notifications helps you maintain an effective monitoring system.

When to Delete Notifications​

Appropriate scenarios for notification deletion:

  • Resolved Issues: Remove notifications for resolved problems
  • Outdated Alerts: Delete notifications for past events
  • System Cleanup: Remove old notifications during maintenance
  • Storage Management: Free up storage space by removing old alerts
  • Focus Management: Remove noise to focus on current issues

Deletion Precautions​

Important considerations before deleting notifications:

  • Audit Requirements: Ensure deletion doesn't violate audit requirements
  • Compliance Needs: Verify deletion aligns with compliance policies
  • Historical Reference: Consider if notifications might be needed for future reference
  • Team Coordination: Coordinate deletions across team members
  • Backup Considerations: Ensure important information is preserved elsewhere

Deletion Strategies​

Implement effective strategies for notification cleanup.

Regular Cleanup​

Establish regular notification cleanup procedures:

  • Daily Review: Review and delete resolved notifications daily
  • Weekly Cleanup: Perform comprehensive cleanup weekly
  • Monthly Maintenance: Conduct thorough cleanup monthly
  • Quarterly Review: Assess overall notification management quarterly

Selective Deletion​

Use selective deletion for targeted cleanup:

  • By Age: Delete notifications older than specified time periods
  • By Status: Remove read notifications that are no longer relevant
  • By Type: Delete notifications for specific resource types or events
  • By Severity: Remove low-priority notifications that have been addressed

Deletion Workflows​

Implement structured workflows for notification deletion.

Individual Deletion Workflow​

Standard workflow for deleting individual notifications:

  1. Review Notification: Assess notification content and relevance
  2. Verify Resolution: Confirm the issue has been resolved
  3. Check Dependencies: Ensure no other processes depend on the notification
  4. Delete Notification: Remove the notification from the system
  5. Confirm Deletion: Verify successful deletion

Bulk Deletion Workflow​

Workflow for bulk notification cleanup:

  1. Identify Candidates: Identify notifications eligible for deletion
  2. Review Criteria: Verify deletion criteria are appropriate
  3. Backup Important Data: Preserve any critical information
  4. Execute Deletion: Perform bulk deletion operation
  5. Verify Results: Confirm successful deletion of all notifications

Deletion Best Practices​

To effectively manage notification deletion:

  1. Establish Policies: Define clear deletion policies and procedures
  2. Regular Review: Periodically review and clean up notifications
  3. Team Coordination: Coordinate deletions across team members
  4. Audit Compliance: Ensure deletions comply with audit requirements
  5. Documentation: Maintain records of deletion activities

Deletion Impact​

Understanding the impact of notification deletion helps you make informed decisions.

Immediate Effects​

Immediate consequences of notification deletion:

  • Storage Reduction: Free up storage space immediately
  • List Updates: Notification lists reflect reduced counts
  • Search Results: Search results no longer include deleted notifications
  • Count Updates: Notification counts are reduced accordingly

Long-Term Effects​

Long-term implications of deletion:

  • Historical Data: Loss of historical notification information
  • Audit Trails: Reduced audit trail completeness
  • Trend Analysis: Limited ability to analyze long-term patterns
  • Compliance Reporting: Potential impact on compliance reporting

Error Handling​

Common deletion issues and solutions:

  • Permission Denied: Ensure you have appropriate deletion rights
  • Notification Not Found: Verify the notification ID exists
  • Dependency Issues: Resolve any dependencies before deletion
  • Bulk Operation Failures: Check notification IDs in bulk operations

After deleting notifications, you may need to:

List Remaining Notifications​

GET /notifications
GET /notifications/count

Review Deletion Impact​

GET /audit_logs/notifications

Restore if Needed​

# Note: Deleted notifications cannot be restored
# Consider archiving important notifications before deletion