Update a monitor
curl --request PATCH \
--url https://www.sentivel.com/api/v1/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"target": "<string>",
"intervalSeconds": 43230,
"timeoutMs": 30500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [
349
],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"enabled": true
}
'import requests
url = "https://www.sentivel.com/api/v1/monitors/{id}"
payload = {
"name": "<string>",
"target": "<string>",
"intervalSeconds": 43230,
"timeoutMs": 30500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [349],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"enabled": True
}
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({
name: '<string>',
target: '<string>',
intervalSeconds: 43230,
timeoutMs: 30500,
openThreshold: 5,
resolveThreshold: 5,
expectedStatusCodes: [349],
keyword: '<string>',
keywordAbsent: '<string>',
degradedAfterMs: 30000,
latencyThresholdMs: 30000,
headers: {},
body: JSON.stringify('<string>'),
contentType: '<string>',
environment: '<string>',
enabled: true
})
};
fetch('https://www.sentivel.com/api/v1/monitors/{id}', 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://www.sentivel.com/api/v1/monitors/{id}",
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([
'name' => '<string>',
'target' => '<string>',
'intervalSeconds' => 43230,
'timeoutMs' => 30500,
'openThreshold' => 5,
'resolveThreshold' => 5,
'expectedStatusCodes' => [
349
],
'keyword' => '<string>',
'keywordAbsent' => '<string>',
'degradedAfterMs' => 30000,
'latencyThresholdMs' => 30000,
'headers' => [
],
'body' => '<string>',
'contentType' => '<string>',
'environment' => '<string>',
'enabled' => true
]),
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://www.sentivel.com/api/v1/monitors/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 30500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"enabled\": true\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://www.sentivel.com/api/v1/monitors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 30500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.sentivel.com/api/v1/monitors/{id}")
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 \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 30500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"componentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": "<string>",
"method": "<string>",
"intervalSeconds": 123,
"timeoutMs": 123,
"openThreshold": 123,
"resolveThreshold": 123,
"environment": "<string>",
"enabled": true,
"lastCheckedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"pingUrl": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}Monitors
Update a monitor
PATCH
/
monitors
/
{id}
Update a monitor
curl --request PATCH \
--url https://www.sentivel.com/api/v1/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"target": "<string>",
"intervalSeconds": 43230,
"timeoutMs": 30500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [
349
],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"enabled": true
}
'import requests
url = "https://www.sentivel.com/api/v1/monitors/{id}"
payload = {
"name": "<string>",
"target": "<string>",
"intervalSeconds": 43230,
"timeoutMs": 30500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [349],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"enabled": True
}
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({
name: '<string>',
target: '<string>',
intervalSeconds: 43230,
timeoutMs: 30500,
openThreshold: 5,
resolveThreshold: 5,
expectedStatusCodes: [349],
keyword: '<string>',
keywordAbsent: '<string>',
degradedAfterMs: 30000,
latencyThresholdMs: 30000,
headers: {},
body: JSON.stringify('<string>'),
contentType: '<string>',
environment: '<string>',
enabled: true
})
};
fetch('https://www.sentivel.com/api/v1/monitors/{id}', 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://www.sentivel.com/api/v1/monitors/{id}",
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([
'name' => '<string>',
'target' => '<string>',
'intervalSeconds' => 43230,
'timeoutMs' => 30500,
'openThreshold' => 5,
'resolveThreshold' => 5,
'expectedStatusCodes' => [
349
],
'keyword' => '<string>',
'keywordAbsent' => '<string>',
'degradedAfterMs' => 30000,
'latencyThresholdMs' => 30000,
'headers' => [
],
'body' => '<string>',
'contentType' => '<string>',
'environment' => '<string>',
'enabled' => true
]),
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://www.sentivel.com/api/v1/monitors/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 30500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"enabled\": true\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://www.sentivel.com/api/v1/monitors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 30500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.sentivel.com/api/v1/monitors/{id}")
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 \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 30500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"componentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": "<string>",
"method": "<string>",
"intervalSeconds": 123,
"timeoutMs": 123,
"openThreshold": 123,
"resolveThreshold": 123,
"environment": "<string>",
"enabled": true,
"lastCheckedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"pingUrl": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}Authorizations
An org API token (sv_…), sent as Authorization: Bearer <token>.
Path Parameters
Body
application/json
All fields optional; only provided fields change.
Required string length:
1 - 120Available options:
GET, HEAD, POST Required range:
60 <= x <= 86400Required range:
1000 <= x <= 60000Required range:
1 <= x <= 10Required range:
1 <= x <= 10Required range:
100 <= x <= 599Maximum string length:
200Maximum string length:
200Show child attributes
Show child attributes
Required range:
1 <= x <= 60000Required range:
1 <= x <= 60000Replace the monitor's custom request headers (stored encrypted).
Show child attributes
Show child attributes
Replace the monitor's request body (stored encrypted).
Maximum string length:
32768Maximum string length:
200Maximum string length:
60Pause/resume the monitor.
Response
The updated monitor.
Show child attributes
Show child attributes
⌘I