Monitor Issues API
Search monitor evaluation history, filter firing evaluations, and inspect instance timelines.
The issues API searches monitor evaluation history across all states, including evaluations that are not firing. Without a status filter, results include all evaluation states in the selected time range. A historical Alerting evaluation does not mean the monitor is still firing now.
Authentication
Use an API key with at least Viewer (read) permissions. Include Authorization: Bearer <YOUR_API_KEY> and X-Backend-Id: <YOUR_BACKEND_ID>. JSON requests require Content-Type: application/json.
The examples use https://api.groundcover.com. Self-hosted installations use their own API URL and an API key issued in that environment.
Search Issues
POST /api/monitors/issues/search
Use a query gcQL string or a structured pipeline (one is required). start and end bound the search. Optional filters adds a gcQL filter; sources accepts structured source conditions.
To retrieve firing evaluations, use status:Alerting with a capital A. state:Alerting is a supported alias; status is the field exposed by discovery. State values are case-sensitive. The following example returns firing evaluations:
curl --request POST 'https://api.groundcover.com/api/monitors/issues/search' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Backend-Id: <YOUR_BACKEND_ID>' \
--header 'Content-Type: application/json' \
--data '{
"start": "2026-10-28T10:00:00Z",
"end": "2026-10-28T11:00:00Z",
"query": "status:Alerting | fields _time, monitor_name, status | sort by (_time desc) | limit 20"
}'The HTTP 200 response is an object containing data (rows) and valueFieldHints (numeric fields); it is not the bare array returned by the older log search API. A query must select rows or aggregate them. To include every evaluation state, use * | limit 20 or * | stats count() as total_evaluations. count() counts evaluations, not distinct incidents; longer time ranges may use rollups.
Aggregate Issues over Time
POST /api/monitors/issues/search-time-series
Adds required bucketDuration, optional valueField, and optional numeric fillValue to the search body. The query must contain an aggregation. valueField can name one numeric result column or a comma-separated list; multiple columns generate a metric_name label. Do not also return a column named metric_name when using multiple value fields. Omitted fillValue leaves empty buckets as null.
The response contains data, an array of labeled time series. This example counts firing evaluations in each bucket. Remove status:Alerting to count evaluations across all states.
Query Instances
Issue searches, instance queries, summaries, and timelines use shared runtime endpoints under /api/monitors. They are separate from the v2 definition-management API.
POST /api/monitors/instances/query
The response contains results and hasMonitors. Each result includes monitor metadata, instance state, labels, silences, and evaluation values. Increment skip by the page size until a page contains fewer than limit results.
bucketResolution is required and accepts lowest, smallBar, bigBar, smallLine, or bigLine. Sort by lastStateStart, active, alertingPercent, lastFiringStart, lastResolved, or firstFiringStart; order is asc or desc. Use structured conditions to filter monitors and sources to scope source data.
Timelines and Filter Discovery
All the following routes use POST and accept JSON with a time range:
/api/monitors/timeline
Optional conditions, sources, bucketResolution
results with monitor-state series
/api/monitors/instances/timeline
conditions selecting exactly one monitor; optional sources, bucketResolution
Array of resource/result series for that monitor
/api/monitors/instances/velocity
Required bucketResolution; optional groupBy (severity or monitor_name), conditions, sources
Issue-count series
/api/monitors/summary/filters
Optional sources, required column descriptors
Available summary filter facets
/api/monitors/instances/filters
Optional sources, required, bucketResolution
Available instance filter facets
/api/monitors/labels/keys
Required limit; optional filter, sources
keys, isLimitReached
/api/monitors/labels/values
Required key, limit; optional filter, conditions, sources
key, values, isLimitReached
/api/monitors/labels/discovery
Required limitByKey; optional filter, conditions, sources
Label discovery results
For example, discover label values to use in a silence or notification route:
See Query Monitors Summary for structured condition examples and Silences API for suppressing notifications.
Last updated
