Monitors
List a monitor's runs
GET
/
api
/
v1
/
monitors
/
{id}
/
runs
List a monitor's runs
curl --request GET \
--url https://us.datafold.com/api/v1/monitors/{id}/runs \
--header 'Authorization: <api-key>'import requests
url = "https://us.datafold.com/api/v1/monitors/{id}/runs"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://us.datafold.com/api/v1/monitors/{id}/runs', 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://us.datafold.com/api/v1/monitors/{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: <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://us.datafold.com/api/v1/monitors/{id}/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://us.datafold.com/api/v1/monitors/{id}/runs")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.datafold.com/api/v1/monitors/{id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"page": 123,
"page_size": 123,
"runs": [
{
"monitor_id": 123,
"run_id": 123,
"diff_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"state": "ok",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total_pages": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Use the 'Authorization' header with the format 'Key '
Path Parameters
The unique identifier of the monitor.
Query Parameters
The page number to retrieve.
Required range:
x >= 1The number of runs per page.
Required range:
1 <= x <= 200⌘I
List a monitor's runs
curl --request GET \
--url https://us.datafold.com/api/v1/monitors/{id}/runs \
--header 'Authorization: <api-key>'import requests
url = "https://us.datafold.com/api/v1/monitors/{id}/runs"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://us.datafold.com/api/v1/monitors/{id}/runs', 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://us.datafold.com/api/v1/monitors/{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: <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://us.datafold.com/api/v1/monitors/{id}/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://us.datafold.com/api/v1/monitors/{id}/runs")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.datafold.com/api/v1/monitors/{id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"page": 123,
"page_size": 123,
"runs": [
{
"monitor_id": 123,
"run_id": 123,
"diff_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"state": "ok",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total_pages": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}