Synthetics
Change a synthetic check
Changes the fields you send and keeps the rest. headers and assertions each replace the whole list. Changing the request or assertions, or disabling the check, ends its open failure without posting a recovery.
PATCH
/
synthetic-checks
/
{checkId}
Change a synthetic check
curl --request PATCH \
--url https://superlog.sh/api/v1/synthetic-checks/{checkId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assertions": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"enabled": true,
"failuresToAlert": 5,
"followRedirects": true,
"headers": [
{
"name": "<string>",
"value": "<string>",
"secret": true
}
],
"intervalSeconds": 123,
"name": "<string>",
"retries": 1,
"slack": {
"channelId": "<string>",
"integrationAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"timeoutMs": 15500,
"url": "<string>"
}
'import requests
url = "https://superlog.sh/api/v1/synthetic-checks/{checkId}"
payload = {
"assertions": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"enabled": True,
"failuresToAlert": 5,
"followRedirects": True,
"headers": [
{
"name": "<string>",
"value": "<string>",
"secret": True
}
],
"intervalSeconds": 123,
"name": "<string>",
"retries": 1,
"slack": {
"channelId": "<string>",
"integrationAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"timeoutMs": 15500,
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assertions: [{key: '<string>', value: '<string>'}],
body: JSON.stringify('<string>'),
enabled: true,
failuresToAlert: 5,
followRedirects: true,
headers: [{name: '<string>', value: '<string>', secret: true}],
intervalSeconds: 123,
name: '<string>',
retries: 1,
slack: {
channelId: '<string>',
integrationAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
timeoutMs: 15500,
url: '<string>'
})
};
fetch('https://superlog.sh/api/v1/synthetic-checks/{checkId}', 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://superlog.sh/api/v1/synthetic-checks/{checkId}",
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([
'assertions' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'body' => '<string>',
'enabled' => true,
'failuresToAlert' => 5,
'followRedirects' => true,
'headers' => [
[
'name' => '<string>',
'value' => '<string>',
'secret' => true
]
],
'intervalSeconds' => 123,
'name' => '<string>',
'retries' => 1,
'slack' => [
'channelId' => '<string>',
'integrationAccountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'timeoutMs' => 15500,
'url' => '<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://superlog.sh/api/v1/synthetic-checks/{checkId}"
payload := strings.NewReader("{\n \"assertions\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"enabled\": true,\n \"failuresToAlert\": 5,\n \"followRedirects\": true,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"secret\": true\n }\n ],\n \"intervalSeconds\": 123,\n \"name\": \"<string>\",\n \"retries\": 1,\n \"slack\": {\n \"channelId\": \"<string>\",\n \"integrationAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"timeoutMs\": 15500,\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://superlog.sh/api/v1/synthetic-checks/{checkId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assertions\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"enabled\": true,\n \"failuresToAlert\": 5,\n \"followRedirects\": true,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"secret\": true\n }\n ],\n \"intervalSeconds\": 123,\n \"name\": \"<string>\",\n \"retries\": 1,\n \"slack\": {\n \"channelId\": \"<string>\",\n \"integrationAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"timeoutMs\": 15500,\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://superlog.sh/api/v1/synthetic-checks/{checkId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assertions\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"enabled\": true,\n \"failuresToAlert\": 5,\n \"followRedirects\": true,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"secret\": true\n }\n ],\n \"intervalSeconds\": 123,\n \"name\": \"<string>\",\n \"retries\": 1,\n \"slack\": {\n \"channelId\": \"<string>\",\n \"integrationAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"timeoutMs\": 15500,\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"check": {
"assertions": [
{
"kind": "status_code",
"op": "eq",
"severity": "critical",
"value": "<string>",
"key": "<string>"
}
],
"body": "<string>",
"createdAt": "<string>",
"enabled": true,
"failuresToAlert": 123,
"followRedirects": true,
"headers": [
{
"name": "<string>",
"secret": true,
"value": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intervalSeconds": 123,
"lastRunAt": "<string>",
"lastStatus": "passed",
"method": "GET",
"name": "<string>",
"retries": 123,
"slack": {
"channelId": "<string>",
"integrationAccountId": "<string>"
},
"statusSince": "<string>",
"timeoutMs": 123,
"updatedAt": "<string>",
"url": "<string>",
"webUrl": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}Authorizations
Body
application/json
⌘I
Change a synthetic check
curl --request PATCH \
--url https://superlog.sh/api/v1/synthetic-checks/{checkId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assertions": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"enabled": true,
"failuresToAlert": 5,
"followRedirects": true,
"headers": [
{
"name": "<string>",
"value": "<string>",
"secret": true
}
],
"intervalSeconds": 123,
"name": "<string>",
"retries": 1,
"slack": {
"channelId": "<string>",
"integrationAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"timeoutMs": 15500,
"url": "<string>"
}
'import requests
url = "https://superlog.sh/api/v1/synthetic-checks/{checkId}"
payload = {
"assertions": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"enabled": True,
"failuresToAlert": 5,
"followRedirects": True,
"headers": [
{
"name": "<string>",
"value": "<string>",
"secret": True
}
],
"intervalSeconds": 123,
"name": "<string>",
"retries": 1,
"slack": {
"channelId": "<string>",
"integrationAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"timeoutMs": 15500,
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assertions: [{key: '<string>', value: '<string>'}],
body: JSON.stringify('<string>'),
enabled: true,
failuresToAlert: 5,
followRedirects: true,
headers: [{name: '<string>', value: '<string>', secret: true}],
intervalSeconds: 123,
name: '<string>',
retries: 1,
slack: {
channelId: '<string>',
integrationAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
timeoutMs: 15500,
url: '<string>'
})
};
fetch('https://superlog.sh/api/v1/synthetic-checks/{checkId}', 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://superlog.sh/api/v1/synthetic-checks/{checkId}",
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([
'assertions' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'body' => '<string>',
'enabled' => true,
'failuresToAlert' => 5,
'followRedirects' => true,
'headers' => [
[
'name' => '<string>',
'value' => '<string>',
'secret' => true
]
],
'intervalSeconds' => 123,
'name' => '<string>',
'retries' => 1,
'slack' => [
'channelId' => '<string>',
'integrationAccountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'timeoutMs' => 15500,
'url' => '<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://superlog.sh/api/v1/synthetic-checks/{checkId}"
payload := strings.NewReader("{\n \"assertions\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"enabled\": true,\n \"failuresToAlert\": 5,\n \"followRedirects\": true,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"secret\": true\n }\n ],\n \"intervalSeconds\": 123,\n \"name\": \"<string>\",\n \"retries\": 1,\n \"slack\": {\n \"channelId\": \"<string>\",\n \"integrationAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"timeoutMs\": 15500,\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://superlog.sh/api/v1/synthetic-checks/{checkId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assertions\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"enabled\": true,\n \"failuresToAlert\": 5,\n \"followRedirects\": true,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"secret\": true\n }\n ],\n \"intervalSeconds\": 123,\n \"name\": \"<string>\",\n \"retries\": 1,\n \"slack\": {\n \"channelId\": \"<string>\",\n \"integrationAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"timeoutMs\": 15500,\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://superlog.sh/api/v1/synthetic-checks/{checkId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assertions\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"enabled\": true,\n \"failuresToAlert\": 5,\n \"followRedirects\": true,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"secret\": true\n }\n ],\n \"intervalSeconds\": 123,\n \"name\": \"<string>\",\n \"retries\": 1,\n \"slack\": {\n \"channelId\": \"<string>\",\n \"integrationAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"timeoutMs\": 15500,\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"check": {
"assertions": [
{
"kind": "status_code",
"op": "eq",
"severity": "critical",
"value": "<string>",
"key": "<string>"
}
],
"body": "<string>",
"createdAt": "<string>",
"enabled": true,
"failuresToAlert": 123,
"followRedirects": true,
"headers": [
{
"name": "<string>",
"secret": true,
"value": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intervalSeconds": 123,
"lastRunAt": "<string>",
"lastStatus": "passed",
"method": "GET",
"name": "<string>",
"retries": 123,
"slack": {
"channelId": "<string>",
"integrationAccountId": "<string>"
},
"statusSince": "<string>",
"timeoutMs": 123,
"updatedAt": "<string>",
"url": "<string>",
"webUrl": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}