List monitor runs
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/monitors/{monitor_id}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.context.dev/v1/monitors/{monitor_id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/monitors/{monitor_id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/monitors/{monitor_id}/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/monitors/{monitor_id}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://api.context.dev/v1/monitors/{monitor_id}/runs \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "run_123",
"monitor_id": "mon_123",
"status": "queued",
"run_type": "baseline",
"target_type": "page",
"change_detection_type": "exact",
"change_detected": true,
"baseline_created": true,
"credits_charged": 1,
"webhook_delivery_ids": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"change_id": "chg_123",
"skip_reason": "insufficient_credits",
"error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"webhook_delivery": {
"event_id": "evt_123",
"event": "change.detected",
"status": "delivered",
"http_status": 200,
"attempted_at": "2023-11-07T05:31:56Z",
"error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"delivery_id": "<string>"
},
"webhook_deliveries": [
{
"event_id": "evt_123",
"event": "change.detected",
"status": "delivered",
"http_status": 200,
"attempted_at": "2023-11-07T05:31:56Z",
"error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"delivery_id": "<string>"
}
]
}
],
"has_more": true,
"next_cursor": "<string>",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "RATE_LIMITED",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}Runs
List monitor runs
List a monitor’s runs, newest first.
GET
/
monitors
/
{monitor_id}
/
runs
List monitor runs
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/monitors/{monitor_id}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.context.dev/v1/monitors/{monitor_id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/monitors/{monitor_id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/monitors/{monitor_id}/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/monitors/{monitor_id}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://api.context.dev/v1/monitors/{monitor_id}/runs \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "run_123",
"monitor_id": "mon_123",
"status": "queued",
"run_type": "baseline",
"target_type": "page",
"change_detection_type": "exact",
"change_detected": true,
"baseline_created": true,
"credits_charged": 1,
"webhook_delivery_ids": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"change_id": "chg_123",
"skip_reason": "insufficient_credits",
"error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"webhook_delivery": {
"event_id": "evt_123",
"event": "change.detected",
"status": "delivered",
"http_status": 200,
"attempted_at": "2023-11-07T05:31:56Z",
"error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"delivery_id": "<string>"
},
"webhook_deliveries": [
{
"event_id": "evt_123",
"event": "change.detected",
"status": "delivered",
"http_status": 200,
"attempted_at": "2023-11-07T05:31:56Z",
"error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"delivery_id": "<string>"
}
]
}
],
"has_more": true,
"next_cursor": "<string>",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "RATE_LIMITED",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}0 credits
Requires
monitors:read permission. See the guide for examples and usage.Authorizations
Send Authorization: Bearer <API_KEY>. Keys have full access unless restricted to scopes.
Path Parameters
ID of the monitor.
Example:
"mon_123"
Query Parameters
Filter runs by lifecycle status.
Available options:
queued, running, completed, failed, skipped Maximum number of items to return per page (1-100). Defaults to 25.
Required range:
1 <= x <= 100Opaque pagination cursor from a previous response.
Response
A paginated list of runs for the monitor
Show child attributes
Show child attributes
Unique ID of this request, also in X-Request-Id. Include it when contacting support.
Example:
"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"
Credits this request used and your remaining balance.
Show child attributes
Show child attributes
Was this page helpful?