const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/monitors/{monitor_id}/runs/{run_id}', 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/{run_id}"
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/{run_id}")
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/{run_id}"
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/{run_id}",
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/{run_id} \
--header 'Authorization: Bearer <token>'{
"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,
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"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>"
}
],
"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
}
}Retrieve a monitor run
Retrieve the status, timing, and results of one monitor run.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/monitors/{monitor_id}/runs/{run_id}', 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/{run_id}"
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/{run_id}")
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/{run_id}"
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/{run_id}",
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/{run_id} \
--header 'Authorization: Bearer <token>'{
"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,
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"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>"
}
],
"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
}
}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.
"mon_123"
ID of the monitor run.
"run_123"
Response
The requested monitor run
"run_123"
"mon_123"
Lifecycle status of a run. skipped runs never executed — see skip_reason (insufficient credits, monitor paused, or superseded by a concurrent run).
queued, running, completed, failed, skipped A baseline run follows creation or a target or detection change.
baseline, scheduled page, sitemap, extract exact, semantic true
True when this run established the monitor's initial baseline; baseline runs perform no change detection.
Credits charged for this run (0 for skipped/failed runs).
x >= 01
Unique ID of this request, also in X-Request-Id. Include it when contacting support.
"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"
Webhook delivery IDs for this run.
"chg_123"
Why a skipped run never executed; null unless status is skipped.
insufficient_credits, monitor_paused, superseded, null Show child attributes
Show child attributes
Deprecated. Use webhook_deliveries for all attempts.
Show child attributes
Show child attributes
All webhook deliveries attempted by this run — one per subscribed event that fired. Omitted when no webhook was attempted, including runs created before event selection was added.
Show child attributes
Show child attributes
Credits this request used and your remaining balance.
Show child attributes
Show child attributes
Was this page helpful?