Skip to main content

Overview

This endpoint provides a quick way to retrieve the total number of open alerts currently in the UTMStack system. It’s commonly used for dashboard widgets, monitoring displays, and alert metrics.
Authorization Required: Include a valid Bearer Token in the Authorization header.

Endpoint Details

GET /api/utm-alerts/count-open-alerts

Method: GET
Authentication: Bearer Token required
Response: Integer count of open alerts

Request & Response Examples

Additional Code Examples


Response Details

Successful Response

The response is a simple integer representing the total count of open alerts.

Status Codes

OK
Successfully retrieved the count of open alerts
Unauthorized
Missing or invalid Bearer token
Internal Server Error
Internal server error while retrieving count

Use Cases

Dashboard Integration

Monitoring and Alerting

Metrics Collection


Performance Considerations

Performance Notes:
  • This endpoint is optimized for frequent polling
  • Response time is typically under 100ms
  • Safe to call every 30-60 seconds for real-time dashboards
  • Uses database indexing for fast count operations
  • Minimal server resources required

Integration Examples

React Dashboard Component

PowerShell Monitoring Script


Best Practices

Recommended intervals:
  • Real-time dashboards: 30-60 seconds
  • Monitoring systems: 2-5 minutes
  • Reporting systems: 15-30 minutes
  • Avoid polling more frequently than every 15 seconds
Handle failures gracefully:
  • Cache the last known count during outages
  • Implement exponential backoff for retries
  • Set timeout values for requests
  • Log failures for troubleshooting
Establish meaningful thresholds:
  • 0 alerts: All clear status
  • 1-10 alerts: Normal operational level
  • 11-50 alerts: Elevated attention needed
  • 50+ alerts: High volume investigation required

OpenAPI Specification