List monitor events
curl --request GET \
--url https://api.coval.dev/v1/monitors/{monitor_id}/events \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coval.dev/v1/monitors/{monitor_id}/events"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coval.dev/v1/monitors/{monitor_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/monitors/{monitor_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/monitors/{monitor_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coval.dev/v1/monitors/{monitor_id}/events")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/monitors/{monitor_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events": [
{
"ulid": "<string>",
"monitor_ulid": "<string>",
"run_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"condition_results": [
{
"metric_id": "<string>",
"metric_display_name": "<string>",
"aggregation": "<string>",
"computed_value": 123,
"threshold": 123,
"operator": "<string>",
"met": true
}
],
"dispatched_channels": [
{
"channel_type": "<string>",
"channel_summary": "<string>",
"success": true,
"error": "<string>"
}
],
"message_sent": "<string>"
}
],
"total_count": 123,
"next_page_token": "<string>"
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "Required scope: monitors:read"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Monitor not found",
"details": [
{
"field": "monitor_id",
"description": "Monitor '01HZ0EXAMPLE00000000000000' not found"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred"
}
]
}
}Monitors
List monitor events
Returns evaluation events for a monitor, ordered by most recent first.
Every run completion that evaluates this monitor produces an event, regardless of outcome (TRIGGERED, NOT_MET, SUPPRESSED, ERROR).
GET
/
monitors
/
{monitor_id}
/
events
List monitor events
curl --request GET \
--url https://api.coval.dev/v1/monitors/{monitor_id}/events \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coval.dev/v1/monitors/{monitor_id}/events"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coval.dev/v1/monitors/{monitor_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/monitors/{monitor_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/monitors/{monitor_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coval.dev/v1/monitors/{monitor_id}/events")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/monitors/{monitor_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events": [
{
"ulid": "<string>",
"monitor_ulid": "<string>",
"run_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"condition_results": [
{
"metric_id": "<string>",
"metric_display_name": "<string>",
"aggregation": "<string>",
"computed_value": 123,
"threshold": 123,
"operator": "<string>",
"met": true
}
],
"dispatched_channels": [
{
"channel_type": "<string>",
"channel_summary": "<string>",
"success": true,
"error": "<string>"
}
],
"message_sent": "<string>"
}
],
"total_count": 123,
"next_page_token": "<string>"
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "Required scope: monitors:read"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Monitor not found",
"details": [
{
"field": "monitor_id",
"description": "Monitor '01HZ0EXAMPLE00000000000000' not found"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred"
}
]
}
}Authorizations
API key for authentication
Path Parameters
Monitor ULID
Pattern:
^[0-9A-Z]{26}$Query Parameters
Filter events by outcome
Available options:
TRIGGERED, NOT_MET, SUPPRESSED, ERROR Number of results per page
Required range:
1 <= x <= 100Token for fetching the next page of results
Was this page helpful?
⌘I