Legacy Monitor Read Compatibility
List monitors and read YAML definitions on backends without monitors v2.
Use Monitors v2 API when the selected backend supports it. For backends without the monitors-v2 capability, the v2 routes return 404, while the legacy list and read endpoints below remain available.
Authentication
Use an API key with at least Viewer (read) permissions. Include Authorization: Bearer <YOUR_API_KEY> and X-Backend-Id: <YOUR_BACKEND_ID>. Self-hosted installations use their own API URL and an API key issued in that environment.
List monitors
POST /api/monitors/list
Send a JSON body with optional limit (defaults to 1,000), skip (defaults to 0), and sort (name or type, default name). Optional query accepts gcQL filters on monitor_name and type, without pipes or aggregations. Use conditions for structured filters instead of query.
curl --request POST 'https://api.groundcover.com/api/monitors/list' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Backend-Id: <YOUR_BACKEND_ID>' \
--header 'Content-Type: application/json' \
--data '{"limit":20,"skip":0,"sort":"name"}'HTTP 200 returns a monitors array and a done flag:
{
"monitors": [
{
"uuid": "00000000-0000-4000-8000-000000000001",
"title": "Checkout error logs",
"type": "logs"
}
],
"done": true
}If done is false, increase skip by the requested page size and repeat with the same filters and sort. This legacy response uses title and monitors; v2 search returns row objects under data.
Read a definition
GET /api/monitors/{uuid}
Use a UUID from the list response to retrieve the YAML definition:
HTTP 200 returns the YAML text directly. See Monitor YAML structure for its fields. An unknown monitor or a monitor without a stored YAML definition returns 404.
For a JSON response, use GET /api/monitors/{uuid}/details:
The response contains data (the YAML definition as a string) and isProvisioned (a boolean). With jq installed, append | jq -r '.data' to display the YAML with its original line breaks. This is the legacy YAML format; use the v2 batch-read endpoint when you need a typed JSON spec.
Last updated
