Update a monitor
curl --request PUT \
--url https://api.justanotheruptime.com/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isActive": true,
"projectId": "<string>",
"settings": {
"timeout": 15.5,
"retries": 1,
"alertThreshold": 2,
"expectedStatusCode": 123,
"expectedResponse": "<string>",
"method": "GET",
"headers": {},
"body": "<string>"
},
"notifications": {
"enabled": true,
"email": true,
"slack": false,
"discord": false,
"teams": false,
"webhook": false,
"threshold": 2,
"recipients": [
"<string>"
]
},
"regions": [
"<string>"
],
"name": "<string>",
"url": "<string>",
"interval": 43230
}
'import requests
url = "https://api.justanotheruptime.com/monitors/{id}"
payload = {
"isActive": True,
"projectId": "<string>",
"settings": {
"timeout": 15.5,
"retries": 1,
"alertThreshold": 2,
"expectedStatusCode": 123,
"expectedResponse": "<string>",
"method": "GET",
"headers": {},
"body": "<string>"
},
"notifications": {
"enabled": True,
"email": True,
"slack": False,
"discord": False,
"teams": False,
"webhook": False,
"threshold": 2,
"recipients": ["<string>"]
},
"regions": ["<string>"],
"name": "<string>",
"url": "<string>",
"interval": 43230
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
isActive: true,
projectId: '<string>',
settings: {
timeout: 15.5,
retries: 1,
alertThreshold: 2,
expectedStatusCode: 123,
expectedResponse: '<string>',
method: 'GET',
headers: {},
body: JSON.stringify('<string>')
},
notifications: {
enabled: true,
email: true,
slack: false,
discord: false,
teams: false,
webhook: false,
threshold: 2,
recipients: ['<string>']
},
regions: ['<string>'],
name: '<string>',
url: '<string>',
interval: 43230
})
};
fetch('https://api.justanotheruptime.com/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://api.justanotheruptime.com/monitors/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'isActive' => true,
'projectId' => '<string>',
'settings' => [
'timeout' => 15.5,
'retries' => 1,
'alertThreshold' => 2,
'expectedStatusCode' => 123,
'expectedResponse' => '<string>',
'method' => 'GET',
'headers' => [
],
'body' => '<string>'
],
'notifications' => [
'enabled' => true,
'email' => true,
'slack' => false,
'discord' => false,
'teams' => false,
'webhook' => false,
'threshold' => 2,
'recipients' => [
'<string>'
]
],
'regions' => [
'<string>'
],
'name' => '<string>',
'url' => '<string>',
'interval' => 43230
]),
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://api.justanotheruptime.com/monitors/{id}"
payload := strings.NewReader("{\n \"isActive\": true,\n \"projectId\": \"<string>\",\n \"settings\": {\n \"timeout\": 15.5,\n \"retries\": 1,\n \"alertThreshold\": 2,\n \"expectedStatusCode\": 123,\n \"expectedResponse\": \"<string>\",\n \"method\": \"GET\",\n \"headers\": {},\n \"body\": \"<string>\"\n },\n \"notifications\": {\n \"enabled\": true,\n \"email\": true,\n \"slack\": false,\n \"discord\": false,\n \"teams\": false,\n \"webhook\": false,\n \"threshold\": 2,\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"regions\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"interval\": 43230\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.justanotheruptime.com/monitors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isActive\": true,\n \"projectId\": \"<string>\",\n \"settings\": {\n \"timeout\": 15.5,\n \"retries\": 1,\n \"alertThreshold\": 2,\n \"expectedStatusCode\": 123,\n \"expectedResponse\": \"<string>\",\n \"method\": \"GET\",\n \"headers\": {},\n \"body\": \"<string>\"\n },\n \"notifications\": {\n \"enabled\": true,\n \"email\": true,\n \"slack\": false,\n \"discord\": false,\n \"teams\": false,\n \"webhook\": false,\n \"threshold\": 2,\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"regions\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"interval\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justanotheruptime.com/monitors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isActive\": true,\n \"projectId\": \"<string>\",\n \"settings\": {\n \"timeout\": 15.5,\n \"retries\": 1,\n \"alertThreshold\": 2,\n \"expectedStatusCode\": 123,\n \"expectedResponse\": \"<string>\",\n \"method\": \"GET\",\n \"headers\": {},\n \"body\": \"<string>\"\n },\n \"notifications\": {\n \"enabled\": true,\n \"email\": true,\n \"slack\": false,\n \"discord\": false,\n \"teams\": false,\n \"webhook\": false,\n \"threshold\": 2,\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"regions\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"interval\": 43230\n}"
response = http.request(request)
puts response.read_body{}Monitors
Update a monitor
PUT
/
monitors
/
{id}
Update a monitor
curl --request PUT \
--url https://api.justanotheruptime.com/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isActive": true,
"projectId": "<string>",
"settings": {
"timeout": 15.5,
"retries": 1,
"alertThreshold": 2,
"expectedStatusCode": 123,
"expectedResponse": "<string>",
"method": "GET",
"headers": {},
"body": "<string>"
},
"notifications": {
"enabled": true,
"email": true,
"slack": false,
"discord": false,
"teams": false,
"webhook": false,
"threshold": 2,
"recipients": [
"<string>"
]
},
"regions": [
"<string>"
],
"name": "<string>",
"url": "<string>",
"interval": 43230
}
'import requests
url = "https://api.justanotheruptime.com/monitors/{id}"
payload = {
"isActive": True,
"projectId": "<string>",
"settings": {
"timeout": 15.5,
"retries": 1,
"alertThreshold": 2,
"expectedStatusCode": 123,
"expectedResponse": "<string>",
"method": "GET",
"headers": {},
"body": "<string>"
},
"notifications": {
"enabled": True,
"email": True,
"slack": False,
"discord": False,
"teams": False,
"webhook": False,
"threshold": 2,
"recipients": ["<string>"]
},
"regions": ["<string>"],
"name": "<string>",
"url": "<string>",
"interval": 43230
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
isActive: true,
projectId: '<string>',
settings: {
timeout: 15.5,
retries: 1,
alertThreshold: 2,
expectedStatusCode: 123,
expectedResponse: '<string>',
method: 'GET',
headers: {},
body: JSON.stringify('<string>')
},
notifications: {
enabled: true,
email: true,
slack: false,
discord: false,
teams: false,
webhook: false,
threshold: 2,
recipients: ['<string>']
},
regions: ['<string>'],
name: '<string>',
url: '<string>',
interval: 43230
})
};
fetch('https://api.justanotheruptime.com/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://api.justanotheruptime.com/monitors/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'isActive' => true,
'projectId' => '<string>',
'settings' => [
'timeout' => 15.5,
'retries' => 1,
'alertThreshold' => 2,
'expectedStatusCode' => 123,
'expectedResponse' => '<string>',
'method' => 'GET',
'headers' => [
],
'body' => '<string>'
],
'notifications' => [
'enabled' => true,
'email' => true,
'slack' => false,
'discord' => false,
'teams' => false,
'webhook' => false,
'threshold' => 2,
'recipients' => [
'<string>'
]
],
'regions' => [
'<string>'
],
'name' => '<string>',
'url' => '<string>',
'interval' => 43230
]),
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://api.justanotheruptime.com/monitors/{id}"
payload := strings.NewReader("{\n \"isActive\": true,\n \"projectId\": \"<string>\",\n \"settings\": {\n \"timeout\": 15.5,\n \"retries\": 1,\n \"alertThreshold\": 2,\n \"expectedStatusCode\": 123,\n \"expectedResponse\": \"<string>\",\n \"method\": \"GET\",\n \"headers\": {},\n \"body\": \"<string>\"\n },\n \"notifications\": {\n \"enabled\": true,\n \"email\": true,\n \"slack\": false,\n \"discord\": false,\n \"teams\": false,\n \"webhook\": false,\n \"threshold\": 2,\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"regions\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"interval\": 43230\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.justanotheruptime.com/monitors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isActive\": true,\n \"projectId\": \"<string>\",\n \"settings\": {\n \"timeout\": 15.5,\n \"retries\": 1,\n \"alertThreshold\": 2,\n \"expectedStatusCode\": 123,\n \"expectedResponse\": \"<string>\",\n \"method\": \"GET\",\n \"headers\": {},\n \"body\": \"<string>\"\n },\n \"notifications\": {\n \"enabled\": true,\n \"email\": true,\n \"slack\": false,\n \"discord\": false,\n \"teams\": false,\n \"webhook\": false,\n \"threshold\": 2,\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"regions\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"interval\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justanotheruptime.com/monitors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isActive\": true,\n \"projectId\": \"<string>\",\n \"settings\": {\n \"timeout\": 15.5,\n \"retries\": 1,\n \"alertThreshold\": 2,\n \"expectedStatusCode\": 123,\n \"expectedResponse\": \"<string>\",\n \"method\": \"GET\",\n \"headers\": {},\n \"body\": \"<string>\"\n },\n \"notifications\": {\n \"enabled\": true,\n \"email\": true,\n \"slack\": false,\n \"discord\": false,\n \"teams\": false,\n \"webhook\": false,\n \"threshold\": 2,\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"regions\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"interval\": 43230\n}"
response = http.request(request)
puts response.read_body{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Whether the monitor is active
The project ID this monitor belongs to
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Selected monitoring regions
The name of the monitor
The URL to monitor
The interval between checks in seconds
Required range:
60 <= x <= 86400Response
The monitor has been successfully updated.
The response is of type object.
⌘I