Update monitor
curl --request PATCH \
--url https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"webhook_ids": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}
'import requests
url = "https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}"
payload = { "webhook_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_ids: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890']})
};
fetch('https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_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://catchall.newscatcherapi.com/catchAll/monitors/{monitor_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([
'webhook_ids' => [
'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}"
payload := strings.NewReader("{\n \"webhook_ids\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_ids\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_ids\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"monitor_id": "3fec5b07-8786-46d7-9486-d43ff67eccd4",
"status": "Monitor updated Successfully"
}{
"detail": "Invalid API key"
}{
"detail": "Invalid API key"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Monitors
Update monitor
Update the webhook configuration for an existing monitor.
PATCH
/
catchAll
/
monitors
/
{monitor_id}
Update monitor
curl --request PATCH \
--url https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"webhook_ids": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}
'import requests
url = "https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}"
payload = { "webhook_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_ids: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890']})
};
fetch('https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_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://catchall.newscatcherapi.com/catchAll/monitors/{monitor_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([
'webhook_ids' => [
'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}"
payload := strings.NewReader("{\n \"webhook_ids\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_ids\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://catchall.newscatcherapi.com/catchAll/monitors/{monitor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_ids\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"monitor_id": "3fec5b07-8786-46d7-9486-d43ff67eccd4",
"status": "Monitor updated Successfully"
}{
"detail": "Invalid API key"
}{
"detail": "Invalid API key"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key for authentication.
Path Parameters
Monitor identifier.
Body
application/json
Updated list of centralized webhook IDs for this monitor.
Replaces all existing webhook assignments. Pass an empty array [] to clear all assignments. Omit to leave existing assignments unchanged.
Example:
["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]
Updated maximum number of records per monitor run.
Required range:
x >= 10Was this page helpful?
⌘I

