curl --request POST \
--url https://developer.synq.io/api/alerts/v2/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifier": {
"fqn": "<string>"
},
"incidentLifecycle": {
"states": []
},
"trigger": {
"query": {
"parts": [
{
"entityIds": {
"entityIds": [
"<string>"
]
}
}
]
},
"resolverQl": "<string>",
"renderedResolverQl": "<string>"
}
}
'import requests
url = "https://developer.synq.io/api/alerts/v2/settings"
payload = {
"identifier": { "fqn": "<string>" },
"incidentLifecycle": { "states": [] },
"trigger": {
"query": { "parts": [{ "entityIds": { "entityIds": ["<string>"] } }] },
"resolverQl": "<string>",
"renderedResolverQl": "<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({
identifier: {fqn: '<string>'},
incidentLifecycle: {states: []},
trigger: {
query: {parts: [{entityIds: {entityIds: ['<string>']}}]},
resolverQl: '<string>',
renderedResolverQl: '<string>'
}
})
};
fetch('https://developer.synq.io/api/alerts/v2/settings', 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/alerts/v2/settings",
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([
'identifier' => [
'fqn' => '<string>'
],
'incidentLifecycle' => [
'states' => [
]
],
'trigger' => [
'query' => [
'parts' => [
[
'entityIds' => [
'entityIds' => [
'<string>'
]
]
]
]
],
'resolverQl' => '<string>',
'renderedResolverQl' => '<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/alerts/v2/settings"
payload := strings.NewReader("{\n \"identifier\": {\n \"fqn\": \"<string>\"\n },\n \"incidentLifecycle\": {\n \"states\": []\n },\n \"trigger\": {\n \"query\": {\n \"parts\": [\n {\n \"entityIds\": {\n \"entityIds\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"resolverQl\": \"<string>\",\n \"renderedResolverQl\": \"<string>\"\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/alerts/v2/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifier\": {\n \"fqn\": \"<string>\"\n },\n \"incidentLifecycle\": {\n \"states\": []\n },\n \"trigger\": {\n \"query\": {\n \"parts\": [\n {\n \"entityIds\": {\n \"entityIds\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"resolverQl\": \"<string>\",\n \"renderedResolverQl\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/alerts/v2/settings")
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 \"identifier\": {\n \"fqn\": \"<string>\"\n },\n \"incidentLifecycle\": {\n \"states\": []\n },\n \"trigger\": {\n \"query\": {\n \"parts\": [\n {\n \"entityIds\": {\n \"entityIds\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"resolverQl\": \"<string>\",\n \"renderedResolverQl\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"alert": {
"createdAt": "2023-01-15T01:30:15.01Z",
"incidentLifecycle": {
"settings": {
"states": [
"STATE_UNSPECIFIED"
]
},
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
},
"id": "<string>",
"name": "<string>",
"fqn": "<string>",
"isDisabled": true,
"template": {
"plain": "<string>",
"title": "<string>"
}
}
}UpdateSettings
Update the trigger and/or the kind-specific settings of an alert. The config can be identified by either ID or FQN.
curl --request POST \
--url https://developer.synq.io/api/alerts/v2/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifier": {
"fqn": "<string>"
},
"incidentLifecycle": {
"states": []
},
"trigger": {
"query": {
"parts": [
{
"entityIds": {
"entityIds": [
"<string>"
]
}
}
]
},
"resolverQl": "<string>",
"renderedResolverQl": "<string>"
}
}
'import requests
url = "https://developer.synq.io/api/alerts/v2/settings"
payload = {
"identifier": { "fqn": "<string>" },
"incidentLifecycle": { "states": [] },
"trigger": {
"query": { "parts": [{ "entityIds": { "entityIds": ["<string>"] } }] },
"resolverQl": "<string>",
"renderedResolverQl": "<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({
identifier: {fqn: '<string>'},
incidentLifecycle: {states: []},
trigger: {
query: {parts: [{entityIds: {entityIds: ['<string>']}}]},
resolverQl: '<string>',
renderedResolverQl: '<string>'
}
})
};
fetch('https://developer.synq.io/api/alerts/v2/settings', 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/alerts/v2/settings",
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([
'identifier' => [
'fqn' => '<string>'
],
'incidentLifecycle' => [
'states' => [
]
],
'trigger' => [
'query' => [
'parts' => [
[
'entityIds' => [
'entityIds' => [
'<string>'
]
]
]
]
],
'resolverQl' => '<string>',
'renderedResolverQl' => '<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/alerts/v2/settings"
payload := strings.NewReader("{\n \"identifier\": {\n \"fqn\": \"<string>\"\n },\n \"incidentLifecycle\": {\n \"states\": []\n },\n \"trigger\": {\n \"query\": {\n \"parts\": [\n {\n \"entityIds\": {\n \"entityIds\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"resolverQl\": \"<string>\",\n \"renderedResolverQl\": \"<string>\"\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/alerts/v2/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifier\": {\n \"fqn\": \"<string>\"\n },\n \"incidentLifecycle\": {\n \"states\": []\n },\n \"trigger\": {\n \"query\": {\n \"parts\": [\n {\n \"entityIds\": {\n \"entityIds\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"resolverQl\": \"<string>\",\n \"renderedResolverQl\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/alerts/v2/settings")
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 \"identifier\": {\n \"fqn\": \"<string>\"\n },\n \"incidentLifecycle\": {\n \"states\": []\n },\n \"trigger\": {\n \"query\": {\n \"parts\": [\n {\n \"entityIds\": {\n \"entityIds\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"resolverQl\": \"<string>\",\n \"renderedResolverQl\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"alert": {
"createdAt": "2023-01-15T01:30:15.01Z",
"incidentLifecycle": {
"settings": {
"states": [
"STATE_UNSPECIFIED"
]
},
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
},
"id": "<string>",
"name": "<string>",
"fqn": "<string>",
"isDisabled": true,
"template": {
"plain": "<string>",
"title": "<string>"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- UpdateSettingsRequest
- UpdateSettingsRequest
- UpdateSettingsRequest
UpdateSettingsRequest updates an alert's trigger and/or its kind-specific settings. At least one of the two must be provided; whichever is omitted is left unchanged (neither can be cleared). The provided settings must match the alert's existing kind — switching an alert from one kind to another is not permitted. update_settings.at_least_one_facet // At least one of trigger or settings must be set. update_settings.trigger_requires_entity // A trigger applies to entity alerts only and cannot be set together with incident lifecycle settings.
Identifier for the config to update.
- identifier
- identifier
Show child attributes
Show child attributes
Settings for an incident lifecycle alert.
Show child attributes
Show child attributes
New entity selection. Issue and schema change alerts only. Omit to keep the current trigger; it cannot be cleared.
Show child attributes
Show child attributes
Response
Success
UpdateSettingsResponse returns the updated alert configuration.
The alert configuration that was updated.
- Alert
- Alert
- Alert
Show child attributes
Show child attributes