BatchCreateMonitor
curl --request POST \
--url https://developer.synq.io/api/monitors/custom-monitors/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"monitors": [
{
"anomalyEngine": {},
"categoryDistribution": {
"field": "<string>",
"topKLimit": 1
},
"daily": {
"minutesSinceMidnight": 719,
"delayNumDays": 1,
"onlyScheduleDelay": true
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"monitoredId": {
"airflowDag": {
"integrationId": "<string>",
"dagId": "<string>"
}
},
"name": "<string>",
"timePartitioning": {
"expression": "<string>",
"interval": "<string>"
},
"segmentation": {
"expression": "<string>",
"includeValues": {
"values": [
"<string>"
]
},
"excludeValues": {
"values": [
"<string>"
]
}
},
"filter": "<string>",
"description": "<string>",
"configId": "<string>",
"timezone": "<string>",
"sqlSource": {
"sql": "<string>"
}
}
]
}
'import requests
url = "https://developer.synq.io/api/monitors/custom-monitors/v1"
payload = { "monitors": [
{
"anomalyEngine": {},
"categoryDistribution": {
"field": "<string>",
"topKLimit": 1
},
"daily": {
"minutesSinceMidnight": 719,
"delayNumDays": 1,
"onlyScheduleDelay": True
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"monitoredId": { "airflowDag": {
"integrationId": "<string>",
"dagId": "<string>"
} },
"name": "<string>",
"timePartitioning": {
"expression": "<string>",
"interval": "<string>"
},
"segmentation": {
"expression": "<string>",
"includeValues": { "values": ["<string>"] },
"excludeValues": { "values": ["<string>"] }
},
"filter": "<string>",
"description": "<string>",
"configId": "<string>",
"timezone": "<string>",
"sqlSource": { "sql": "<string>" }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
monitors: [
{
anomalyEngine: {},
categoryDistribution: {field: '<string>', topKLimit: 1},
daily: {minutesSinceMidnight: 719, delayNumDays: 1, onlyScheduleDelay: true},
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
monitoredId: {airflowDag: {integrationId: '<string>', dagId: '<string>'}},
name: '<string>',
timePartitioning: {expression: '<string>', interval: '<string>'},
segmentation: {
expression: '<string>',
includeValues: {values: ['<string>']},
excludeValues: {values: ['<string>']}
},
filter: '<string>',
description: '<string>',
configId: '<string>',
timezone: '<string>',
sqlSource: {sql: '<string>'}
}
]
})
};
fetch('https://developer.synq.io/api/monitors/custom-monitors/v1', 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://developer.synq.io/api/monitors/custom-monitors/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'monitors' => [
[
'anomalyEngine' => [
],
'categoryDistribution' => [
'field' => '<string>',
'topKLimit' => 1
],
'daily' => [
'minutesSinceMidnight' => 719,
'delayNumDays' => 1,
'onlyScheduleDelay' => true
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'monitoredId' => [
'airflowDag' => [
'integrationId' => '<string>',
'dagId' => '<string>'
]
],
'name' => '<string>',
'timePartitioning' => [
'expression' => '<string>',
'interval' => '<string>'
],
'segmentation' => [
'expression' => '<string>',
'includeValues' => [
'values' => [
'<string>'
]
],
'excludeValues' => [
'values' => [
'<string>'
]
]
],
'filter' => '<string>',
'description' => '<string>',
'configId' => '<string>',
'timezone' => '<string>',
'sqlSource' => [
'sql' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://developer.synq.io/api/monitors/custom-monitors/v1"
payload := strings.NewReader("{\n \"monitors\": [\n {\n \"anomalyEngine\": {},\n \"categoryDistribution\": {\n \"field\": \"<string>\",\n \"topKLimit\": 1\n },\n \"daily\": {\n \"minutesSinceMidnight\": 719,\n \"delayNumDays\": 1,\n \"onlyScheduleDelay\": true\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"monitoredId\": {\n \"airflowDag\": {\n \"integrationId\": \"<string>\",\n \"dagId\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"timePartitioning\": {\n \"expression\": \"<string>\",\n \"interval\": \"<string>\"\n },\n \"segmentation\": {\n \"expression\": \"<string>\",\n \"includeValues\": {\n \"values\": [\n \"<string>\"\n ]\n },\n \"excludeValues\": {\n \"values\": [\n \"<string>\"\n ]\n }\n },\n \"filter\": \"<string>\",\n \"description\": \"<string>\",\n \"configId\": \"<string>\",\n \"timezone\": \"<string>\",\n \"sqlSource\": {\n \"sql\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://developer.synq.io/api/monitors/custom-monitors/v1")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"monitors\": [\n {\n \"anomalyEngine\": {},\n \"categoryDistribution\": {\n \"field\": \"<string>\",\n \"topKLimit\": 1\n },\n \"daily\": {\n \"minutesSinceMidnight\": 719,\n \"delayNumDays\": 1,\n \"onlyScheduleDelay\": true\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"monitoredId\": {\n \"airflowDag\": {\n \"integrationId\": \"<string>\",\n \"dagId\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"timePartitioning\": {\n \"expression\": \"<string>\",\n \"interval\": \"<string>\"\n },\n \"segmentation\": {\n \"expression\": \"<string>\",\n \"includeValues\": {\n \"values\": [\n \"<string>\"\n ]\n },\n \"excludeValues\": {\n \"values\": [\n \"<string>\"\n ]\n }\n },\n \"filter\": \"<string>\",\n \"description\": \"<string>\",\n \"configId\": \"<string>\",\n \"timezone\": \"<string>\",\n \"sqlSource\": {\n \"sql\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/monitors/custom-monitors/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"monitors\": [\n {\n \"anomalyEngine\": {},\n \"categoryDistribution\": {\n \"field\": \"<string>\",\n \"topKLimit\": 1\n },\n \"daily\": {\n \"minutesSinceMidnight\": 719,\n \"delayNumDays\": 1,\n \"onlyScheduleDelay\": true\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"monitoredId\": {\n \"airflowDag\": {\n \"integrationId\": \"<string>\",\n \"dagId\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"timePartitioning\": {\n \"expression\": \"<string>\",\n \"interval\": \"<string>\"\n },\n \"segmentation\": {\n \"expression\": \"<string>\",\n \"includeValues\": {\n \"values\": [\n \"<string>\"\n ]\n },\n \"excludeValues\": {\n \"values\": [\n \"<string>\"\n ]\n }\n },\n \"filter\": \"<string>\",\n \"description\": \"<string>\",\n \"configId\": \"<string>\",\n \"timezone\": \"<string>\",\n \"sqlSource\": {\n \"sql\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdMonitorIds": [
"<string>"
]
}synq.monitors.custom_monitors.v1.CustomMonitorsService
BatchCreateMonitor
POST
/
api
/
monitors
/
custom-monitors
/
v1
BatchCreateMonitor
curl --request POST \
--url https://developer.synq.io/api/monitors/custom-monitors/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"monitors": [
{
"anomalyEngine": {},
"categoryDistribution": {
"field": "<string>",
"topKLimit": 1
},
"daily": {
"minutesSinceMidnight": 719,
"delayNumDays": 1,
"onlyScheduleDelay": true
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"monitoredId": {
"airflowDag": {
"integrationId": "<string>",
"dagId": "<string>"
}
},
"name": "<string>",
"timePartitioning": {
"expression": "<string>",
"interval": "<string>"
},
"segmentation": {
"expression": "<string>",
"includeValues": {
"values": [
"<string>"
]
},
"excludeValues": {
"values": [
"<string>"
]
}
},
"filter": "<string>",
"description": "<string>",
"configId": "<string>",
"timezone": "<string>",
"sqlSource": {
"sql": "<string>"
}
}
]
}
'import requests
url = "https://developer.synq.io/api/monitors/custom-monitors/v1"
payload = { "monitors": [
{
"anomalyEngine": {},
"categoryDistribution": {
"field": "<string>",
"topKLimit": 1
},
"daily": {
"minutesSinceMidnight": 719,
"delayNumDays": 1,
"onlyScheduleDelay": True
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"monitoredId": { "airflowDag": {
"integrationId": "<string>",
"dagId": "<string>"
} },
"name": "<string>",
"timePartitioning": {
"expression": "<string>",
"interval": "<string>"
},
"segmentation": {
"expression": "<string>",
"includeValues": { "values": ["<string>"] },
"excludeValues": { "values": ["<string>"] }
},
"filter": "<string>",
"description": "<string>",
"configId": "<string>",
"timezone": "<string>",
"sqlSource": { "sql": "<string>" }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
monitors: [
{
anomalyEngine: {},
categoryDistribution: {field: '<string>', topKLimit: 1},
daily: {minutesSinceMidnight: 719, delayNumDays: 1, onlyScheduleDelay: true},
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
monitoredId: {airflowDag: {integrationId: '<string>', dagId: '<string>'}},
name: '<string>',
timePartitioning: {expression: '<string>', interval: '<string>'},
segmentation: {
expression: '<string>',
includeValues: {values: ['<string>']},
excludeValues: {values: ['<string>']}
},
filter: '<string>',
description: '<string>',
configId: '<string>',
timezone: '<string>',
sqlSource: {sql: '<string>'}
}
]
})
};
fetch('https://developer.synq.io/api/monitors/custom-monitors/v1', 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://developer.synq.io/api/monitors/custom-monitors/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'monitors' => [
[
'anomalyEngine' => [
],
'categoryDistribution' => [
'field' => '<string>',
'topKLimit' => 1
],
'daily' => [
'minutesSinceMidnight' => 719,
'delayNumDays' => 1,
'onlyScheduleDelay' => true
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'monitoredId' => [
'airflowDag' => [
'integrationId' => '<string>',
'dagId' => '<string>'
]
],
'name' => '<string>',
'timePartitioning' => [
'expression' => '<string>',
'interval' => '<string>'
],
'segmentation' => [
'expression' => '<string>',
'includeValues' => [
'values' => [
'<string>'
]
],
'excludeValues' => [
'values' => [
'<string>'
]
]
],
'filter' => '<string>',
'description' => '<string>',
'configId' => '<string>',
'timezone' => '<string>',
'sqlSource' => [
'sql' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://developer.synq.io/api/monitors/custom-monitors/v1"
payload := strings.NewReader("{\n \"monitors\": [\n {\n \"anomalyEngine\": {},\n \"categoryDistribution\": {\n \"field\": \"<string>\",\n \"topKLimit\": 1\n },\n \"daily\": {\n \"minutesSinceMidnight\": 719,\n \"delayNumDays\": 1,\n \"onlyScheduleDelay\": true\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"monitoredId\": {\n \"airflowDag\": {\n \"integrationId\": \"<string>\",\n \"dagId\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"timePartitioning\": {\n \"expression\": \"<string>\",\n \"interval\": \"<string>\"\n },\n \"segmentation\": {\n \"expression\": \"<string>\",\n \"includeValues\": {\n \"values\": [\n \"<string>\"\n ]\n },\n \"excludeValues\": {\n \"values\": [\n \"<string>\"\n ]\n }\n },\n \"filter\": \"<string>\",\n \"description\": \"<string>\",\n \"configId\": \"<string>\",\n \"timezone\": \"<string>\",\n \"sqlSource\": {\n \"sql\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://developer.synq.io/api/monitors/custom-monitors/v1")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"monitors\": [\n {\n \"anomalyEngine\": {},\n \"categoryDistribution\": {\n \"field\": \"<string>\",\n \"topKLimit\": 1\n },\n \"daily\": {\n \"minutesSinceMidnight\": 719,\n \"delayNumDays\": 1,\n \"onlyScheduleDelay\": true\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"monitoredId\": {\n \"airflowDag\": {\n \"integrationId\": \"<string>\",\n \"dagId\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"timePartitioning\": {\n \"expression\": \"<string>\",\n \"interval\": \"<string>\"\n },\n \"segmentation\": {\n \"expression\": \"<string>\",\n \"includeValues\": {\n \"values\": [\n \"<string>\"\n ]\n },\n \"excludeValues\": {\n \"values\": [\n \"<string>\"\n ]\n }\n },\n \"filter\": \"<string>\",\n \"description\": \"<string>\",\n \"configId\": \"<string>\",\n \"timezone\": \"<string>\",\n \"sqlSource\": {\n \"sql\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/monitors/custom-monitors/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"monitors\": [\n {\n \"anomalyEngine\": {},\n \"categoryDistribution\": {\n \"field\": \"<string>\",\n \"topKLimit\": 1\n },\n \"daily\": {\n \"minutesSinceMidnight\": 719,\n \"delayNumDays\": 1,\n \"onlyScheduleDelay\": true\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"monitoredId\": {\n \"airflowDag\": {\n \"integrationId\": \"<string>\",\n \"dagId\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"timePartitioning\": {\n \"expression\": \"<string>\",\n \"interval\": \"<string>\"\n },\n \"segmentation\": {\n \"expression\": \"<string>\",\n \"includeValues\": {\n \"values\": [\n \"<string>\"\n ]\n },\n \"excludeValues\": {\n \"values\": [\n \"<string>\"\n ]\n }\n },\n \"filter\": \"<string>\",\n \"description\": \"<string>\",\n \"configId\": \"<string>\",\n \"timezone\": \"<string>\",\n \"sqlSource\": {\n \"sql\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdMonitorIds": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Minimum array length:
1filter_not_supported_for_table_stats // filter is not supported for table stats monitors segmentation_not_supported_for_field_stats_and_table_stats // Segmentation is not supported for field stats and table stats monitors sql_source_not_supported_for_table_stats // sql_source is not supported for table stats monitors time_partitioning_required_for_non_table_stats // time_partitioning is required when table_stats is not set, and must not be set when table_stats is set
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
- MonitorDefinition
Show child attributes
Show child attributes
Response
200 - application/json
Success
⌘I