Overview
This endpoint returns unique values for a specified alert property (field) along with the count of how many times each value appears. It’s useful for creating filter dropdowns, analytics dashboards, and understanding data distribution in your alerts.Authorization Required: Include a valid Bearer Token in the Authorization header.
Endpoint Details
POST /api/elasticsearch/property/values-with-count
Method: POST
Content-Type: application/json
Authentication: Bearer Token required
Response: Array of value/count objects
Content-Type: application/json
Authentication: Bearer Token required
Response: Array of value/count objects
Request Body
string
required
The alert property field to analyze (e.g., “status”, “severity”, “dataSource”)
array
Optional filters to apply before analyzing the field values
string
required
Elasticsearch index pattern to search (typically “alert-*”)
integer
default:"10"
Maximum number of unique values to return
boolean
default:"true"
Whether to order results by count (true) or alphabetically (false)
boolean
default:"false"
Sort order: true for ascending, false for descending
JSON Schema
Request & Response Examples
Additional Code Examples
Response Details
Successful Response
- Severity Analysis
- Data Source Analysis
- Empty Result
Status Codes
OK
Successfully retrieved property values and counts
Bad Request
Invalid field name, malformed filters, or invalid parameters
Unauthorized
Missing or invalid Bearer token
Internal Server Error
Internal server error during analysis
Common Use Cases
Filter Dropdown Population
Analytics Dashboard
Top Offenders Report
Advanced Filtering Examples
Time-based Analysis
Exclude False Positives
Category Analysis
Performance Considerations
Best Practices
Field Selection
Field Selection
Commonly analyzed fields:
severity- Alert severity levelsstatus- Alert status distributiondataSource- Top alert sourcescategory- Alert categoriestactic- MITRE ATT&CK tacticstags- Applied tags
Filter Strategy
Filter Strategy
Effective filtering:
- Always include time filters to limit scope
- Exclude false positives for meaningful analysis
- Filter by status to focus on actionable alerts
- Use severity filters for priority analysis
Result Limits
Result Limits
Appropriate limits:
- Dropdowns: 10-20 items
- Dashboard charts: 5-15 items
- Reports: 20-50 items
- Avoid requesting more than 100 items