Monitors
Update a Monitor
PATCH
/
api
/
v1
/
monitors
/
{id}
/
update
Update a Monitor
curl --request PATCH \
--url https://app.datafold.com/api/v1/monitors/{id}/update \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"alert": {
"different_rows_count": 123,
"different_rows_percent": 123,
"match_ratio_min": 0.5
},
"datadiff": {
"column_remapping": {},
"columns_to_compare": [
"<string>"
],
"compare_duplicates": true,
"ignore_string_case": true,
"materialize_results": true,
"null_equals_empty_string": true,
"primary_key": [
"<string>"
],
"sampling": {
"confidence": 123,
"tolerance": 123,
"threshold": 123
},
"sort_array_columns": true,
"timeseries_dimension_column": "<string>",
"tolerance": {
"datetime": {},
"float": {
"column_tolerance": {},
"default": {
"value": 123,
"type": "relative"
}
}
}
},
"description": "<string>",
"name": "<string>",
"notifications": [
{
"recipients": [
"<string>"
],
"features": [],
"type": "email"
}
],
"owner": "<string>",
"schedule": {
"interval": {
"every": "<string>",
"type": "hourly"
}
},
"tags": [
"<string>"
]
}
'import requests
url = "https://app.datafold.com/api/v1/monitors/{id}/update"
payload = {
"type": "<string>",
"alert": {
"different_rows_count": 123,
"different_rows_percent": 123,
"match_ratio_min": 0.5
},
"datadiff": {
"column_remapping": {},
"columns_to_compare": ["<string>"],
"compare_duplicates": True,
"ignore_string_case": True,
"materialize_results": True,
"null_equals_empty_string": True,
"primary_key": ["<string>"],
"sampling": {
"confidence": 123,
"tolerance": 123,
"threshold": 123
},
"sort_array_columns": True,
"timeseries_dimension_column": "<string>",
"tolerance": {
"datetime": {},
"float": {
"column_tolerance": {},
"default": {
"value": 123,
"type": "relative"
}
}
}
},
"description": "<string>",
"name": "<string>",
"notifications": [
{
"recipients": ["<string>"],
"features": [],
"type": "email"
}
],
"owner": "<string>",
"schedule": { "interval": {
"every": "<string>",
"type": "hourly"
} },
"tags": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
alert: {different_rows_count: 123, different_rows_percent: 123, match_ratio_min: 0.5},
datadiff: {
column_remapping: {},
columns_to_compare: ['<string>'],
compare_duplicates: true,
ignore_string_case: true,
materialize_results: true,
null_equals_empty_string: true,
primary_key: ['<string>'],
sampling: {confidence: 123, tolerance: 123, threshold: 123},
sort_array_columns: true,
timeseries_dimension_column: '<string>',
tolerance: {
datetime: {},
float: {column_tolerance: {}, default: {value: 123, type: 'relative'}}
}
},
description: '<string>',
name: '<string>',
notifications: [{recipients: ['<string>'], features: [], type: 'email'}],
owner: '<string>',
schedule: {interval: {every: '<string>', type: 'hourly'}},
tags: ['<string>']
})
};
fetch('https://app.datafold.com/api/v1/monitors/{id}/update', 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://app.datafold.com/api/v1/monitors/{id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'alert' => [
'different_rows_count' => 123,
'different_rows_percent' => 123,
'match_ratio_min' => 0.5
],
'datadiff' => [
'column_remapping' => [
],
'columns_to_compare' => [
'<string>'
],
'compare_duplicates' => true,
'ignore_string_case' => true,
'materialize_results' => true,
'null_equals_empty_string' => true,
'primary_key' => [
'<string>'
],
'sampling' => [
'confidence' => 123,
'tolerance' => 123,
'threshold' => 123
],
'sort_array_columns' => true,
'timeseries_dimension_column' => '<string>',
'tolerance' => [
'datetime' => [
],
'float' => [
'column_tolerance' => [
],
'default' => [
'value' => 123,
'type' => 'relative'
]
]
]
],
'description' => '<string>',
'name' => '<string>',
'notifications' => [
[
'recipients' => [
'<string>'
],
'features' => [
],
'type' => 'email'
]
],
'owner' => '<string>',
'schedule' => [
'interval' => [
'every' => '<string>',
'type' => 'hourly'
]
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.datafold.com/api/v1/monitors/{id}/update"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"alert\": {\n \"different_rows_count\": 123,\n \"different_rows_percent\": 123,\n \"match_ratio_min\": 0.5\n },\n \"datadiff\": {\n \"column_remapping\": {},\n \"columns_to_compare\": [\n \"<string>\"\n ],\n \"compare_duplicates\": true,\n \"ignore_string_case\": true,\n \"materialize_results\": true,\n \"null_equals_empty_string\": true,\n \"primary_key\": [\n \"<string>\"\n ],\n \"sampling\": {\n \"confidence\": 123,\n \"tolerance\": 123,\n \"threshold\": 123\n },\n \"sort_array_columns\": true,\n \"timeseries_dimension_column\": \"<string>\",\n \"tolerance\": {\n \"datetime\": {},\n \"float\": {\n \"column_tolerance\": {},\n \"default\": {\n \"value\": 123,\n \"type\": \"relative\"\n }\n }\n }\n },\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notifications\": [\n {\n \"recipients\": [\n \"<string>\"\n ],\n \"features\": [],\n \"type\": \"email\"\n }\n ],\n \"owner\": \"<string>\",\n \"schedule\": {\n \"interval\": {\n \"every\": \"<string>\",\n \"type\": \"hourly\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.datafold.com/api/v1/monitors/{id}/update")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"alert\": {\n \"different_rows_count\": 123,\n \"different_rows_percent\": 123,\n \"match_ratio_min\": 0.5\n },\n \"datadiff\": {\n \"column_remapping\": {},\n \"columns_to_compare\": [\n \"<string>\"\n ],\n \"compare_duplicates\": true,\n \"ignore_string_case\": true,\n \"materialize_results\": true,\n \"null_equals_empty_string\": true,\n \"primary_key\": [\n \"<string>\"\n ],\n \"sampling\": {\n \"confidence\": 123,\n \"tolerance\": 123,\n \"threshold\": 123\n },\n \"sort_array_columns\": true,\n \"timeseries_dimension_column\": \"<string>\",\n \"tolerance\": {\n \"datetime\": {},\n \"float\": {\n \"column_tolerance\": {},\n \"default\": {\n \"value\": 123,\n \"type\": \"relative\"\n }\n }\n }\n },\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notifications\": [\n {\n \"recipients\": [\n \"<string>\"\n ],\n \"features\": [],\n \"type\": \"email\"\n }\n ],\n \"owner\": \"<string>\",\n \"schedule\": {\n \"interval\": {\n \"every\": \"<string>\",\n \"type\": \"hourly\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.datafold.com/api/v1/monitors/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"alert\": {\n \"different_rows_count\": 123,\n \"different_rows_percent\": 123,\n \"match_ratio_min\": 0.5\n },\n \"datadiff\": {\n \"column_remapping\": {},\n \"columns_to_compare\": [\n \"<string>\"\n ],\n \"compare_duplicates\": true,\n \"ignore_string_case\": true,\n \"materialize_results\": true,\n \"null_equals_empty_string\": true,\n \"primary_key\": [\n \"<string>\"\n ],\n \"sampling\": {\n \"confidence\": 123,\n \"tolerance\": 123,\n \"threshold\": 123\n },\n \"sort_array_columns\": true,\n \"timeseries_dimension_column\": \"<string>\",\n \"tolerance\": {\n \"datetime\": {},\n \"float\": {\n \"column_tolerance\": {},\n \"default\": {\n \"value\": 123,\n \"type\": \"relative\"\n }\n }\n }\n },\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notifications\": [\n {\n \"recipients\": [\n \"<string>\"\n ],\n \"features\": [],\n \"type\": \"email\"\n }\n ],\n \"owner\": \"<string>\",\n \"schedule\": {\n \"interval\": {\n \"every\": \"<string>\",\n \"type\": \"hourly\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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.
Body
application/json
- Diff
- Metric
- Schema
- Data
The type of monitor.
Allowed value:
"diff"Condition for triggering alerts based on the data diff.
Show child attributes
Show child attributes
Configuration for the data diff.
- In-Database
- In-Memory
Show child attributes
Show child attributes
The description of the monitor.
The name of the monitor.
notifications
(Email · object | PagerDuty · object | Webhook · object | Slack · object | Teams · object)[]
Notification configuration for the monitor.
- Email
- PagerDuty
- Webhook
- Slack
- Teams
Show child attributes
Show child attributes
Email of the monitor owner.
The schedule at which the monitor runs.
- Interval
- Cron
- None
Show child attributes
Show child attributes
Tags associated with the monitor.
Response
Successful Response
⌘I
Update a Monitor
curl --request PATCH \
--url https://app.datafold.com/api/v1/monitors/{id}/update \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"alert": {
"different_rows_count": 123,
"different_rows_percent": 123,
"match_ratio_min": 0.5
},
"datadiff": {
"column_remapping": {},
"columns_to_compare": [
"<string>"
],
"compare_duplicates": true,
"ignore_string_case": true,
"materialize_results": true,
"null_equals_empty_string": true,
"primary_key": [
"<string>"
],
"sampling": {
"confidence": 123,
"tolerance": 123,
"threshold": 123
},
"sort_array_columns": true,
"timeseries_dimension_column": "<string>",
"tolerance": {
"datetime": {},
"float": {
"column_tolerance": {},
"default": {
"value": 123,
"type": "relative"
}
}
}
},
"description": "<string>",
"name": "<string>",
"notifications": [
{
"recipients": [
"<string>"
],
"features": [],
"type": "email"
}
],
"owner": "<string>",
"schedule": {
"interval": {
"every": "<string>",
"type": "hourly"
}
},
"tags": [
"<string>"
]
}
'import requests
url = "https://app.datafold.com/api/v1/monitors/{id}/update"
payload = {
"type": "<string>",
"alert": {
"different_rows_count": 123,
"different_rows_percent": 123,
"match_ratio_min": 0.5
},
"datadiff": {
"column_remapping": {},
"columns_to_compare": ["<string>"],
"compare_duplicates": True,
"ignore_string_case": True,
"materialize_results": True,
"null_equals_empty_string": True,
"primary_key": ["<string>"],
"sampling": {
"confidence": 123,
"tolerance": 123,
"threshold": 123
},
"sort_array_columns": True,
"timeseries_dimension_column": "<string>",
"tolerance": {
"datetime": {},
"float": {
"column_tolerance": {},
"default": {
"value": 123,
"type": "relative"
}
}
}
},
"description": "<string>",
"name": "<string>",
"notifications": [
{
"recipients": ["<string>"],
"features": [],
"type": "email"
}
],
"owner": "<string>",
"schedule": { "interval": {
"every": "<string>",
"type": "hourly"
} },
"tags": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
alert: {different_rows_count: 123, different_rows_percent: 123, match_ratio_min: 0.5},
datadiff: {
column_remapping: {},
columns_to_compare: ['<string>'],
compare_duplicates: true,
ignore_string_case: true,
materialize_results: true,
null_equals_empty_string: true,
primary_key: ['<string>'],
sampling: {confidence: 123, tolerance: 123, threshold: 123},
sort_array_columns: true,
timeseries_dimension_column: '<string>',
tolerance: {
datetime: {},
float: {column_tolerance: {}, default: {value: 123, type: 'relative'}}
}
},
description: '<string>',
name: '<string>',
notifications: [{recipients: ['<string>'], features: [], type: 'email'}],
owner: '<string>',
schedule: {interval: {every: '<string>', type: 'hourly'}},
tags: ['<string>']
})
};
fetch('https://app.datafold.com/api/v1/monitors/{id}/update', 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://app.datafold.com/api/v1/monitors/{id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'alert' => [
'different_rows_count' => 123,
'different_rows_percent' => 123,
'match_ratio_min' => 0.5
],
'datadiff' => [
'column_remapping' => [
],
'columns_to_compare' => [
'<string>'
],
'compare_duplicates' => true,
'ignore_string_case' => true,
'materialize_results' => true,
'null_equals_empty_string' => true,
'primary_key' => [
'<string>'
],
'sampling' => [
'confidence' => 123,
'tolerance' => 123,
'threshold' => 123
],
'sort_array_columns' => true,
'timeseries_dimension_column' => '<string>',
'tolerance' => [
'datetime' => [
],
'float' => [
'column_tolerance' => [
],
'default' => [
'value' => 123,
'type' => 'relative'
]
]
]
],
'description' => '<string>',
'name' => '<string>',
'notifications' => [
[
'recipients' => [
'<string>'
],
'features' => [
],
'type' => 'email'
]
],
'owner' => '<string>',
'schedule' => [
'interval' => [
'every' => '<string>',
'type' => 'hourly'
]
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.datafold.com/api/v1/monitors/{id}/update"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"alert\": {\n \"different_rows_count\": 123,\n \"different_rows_percent\": 123,\n \"match_ratio_min\": 0.5\n },\n \"datadiff\": {\n \"column_remapping\": {},\n \"columns_to_compare\": [\n \"<string>\"\n ],\n \"compare_duplicates\": true,\n \"ignore_string_case\": true,\n \"materialize_results\": true,\n \"null_equals_empty_string\": true,\n \"primary_key\": [\n \"<string>\"\n ],\n \"sampling\": {\n \"confidence\": 123,\n \"tolerance\": 123,\n \"threshold\": 123\n },\n \"sort_array_columns\": true,\n \"timeseries_dimension_column\": \"<string>\",\n \"tolerance\": {\n \"datetime\": {},\n \"float\": {\n \"column_tolerance\": {},\n \"default\": {\n \"value\": 123,\n \"type\": \"relative\"\n }\n }\n }\n },\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notifications\": [\n {\n \"recipients\": [\n \"<string>\"\n ],\n \"features\": [],\n \"type\": \"email\"\n }\n ],\n \"owner\": \"<string>\",\n \"schedule\": {\n \"interval\": {\n \"every\": \"<string>\",\n \"type\": \"hourly\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.datafold.com/api/v1/monitors/{id}/update")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"alert\": {\n \"different_rows_count\": 123,\n \"different_rows_percent\": 123,\n \"match_ratio_min\": 0.5\n },\n \"datadiff\": {\n \"column_remapping\": {},\n \"columns_to_compare\": [\n \"<string>\"\n ],\n \"compare_duplicates\": true,\n \"ignore_string_case\": true,\n \"materialize_results\": true,\n \"null_equals_empty_string\": true,\n \"primary_key\": [\n \"<string>\"\n ],\n \"sampling\": {\n \"confidence\": 123,\n \"tolerance\": 123,\n \"threshold\": 123\n },\n \"sort_array_columns\": true,\n \"timeseries_dimension_column\": \"<string>\",\n \"tolerance\": {\n \"datetime\": {},\n \"float\": {\n \"column_tolerance\": {},\n \"default\": {\n \"value\": 123,\n \"type\": \"relative\"\n }\n }\n }\n },\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notifications\": [\n {\n \"recipients\": [\n \"<string>\"\n ],\n \"features\": [],\n \"type\": \"email\"\n }\n ],\n \"owner\": \"<string>\",\n \"schedule\": {\n \"interval\": {\n \"every\": \"<string>\",\n \"type\": \"hourly\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.datafold.com/api/v1/monitors/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"alert\": {\n \"different_rows_count\": 123,\n \"different_rows_percent\": 123,\n \"match_ratio_min\": 0.5\n },\n \"datadiff\": {\n \"column_remapping\": {},\n \"columns_to_compare\": [\n \"<string>\"\n ],\n \"compare_duplicates\": true,\n \"ignore_string_case\": true,\n \"materialize_results\": true,\n \"null_equals_empty_string\": true,\n \"primary_key\": [\n \"<string>\"\n ],\n \"sampling\": {\n \"confidence\": 123,\n \"tolerance\": 123,\n \"threshold\": 123\n },\n \"sort_array_columns\": true,\n \"timeseries_dimension_column\": \"<string>\",\n \"tolerance\": {\n \"datetime\": {},\n \"float\": {\n \"column_tolerance\": {},\n \"default\": {\n \"value\": 123,\n \"type\": \"relative\"\n }\n }\n }\n },\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notifications\": [\n {\n \"recipients\": [\n \"<string>\"\n ],\n \"features\": [],\n \"type\": \"email\"\n }\n ],\n \"owner\": \"<string>\",\n \"schedule\": {\n \"interval\": {\n \"every\": \"<string>\",\n \"type\": \"hourly\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}