alerts
Update Alert
Admin or owner. Omitted fields are left alone, so the enable/disable toggle is a one-field PATCH rather than a round trip to read the rule first.
PATCH
/
v1
/
alerts
/
{alertId}
Update Alert
curl --request PATCH \
--url https://mcpulse-production.up.railway.app/v1/alerts/{alertId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"threshold": 123,
"tool_name": "<string>",
"client_name": "<string>",
"min_calls": 50000,
"channels": [],
"enabled": true
}
'import requests
url = "https://mcpulse-production.up.railway.app/v1/alerts/{alertId}"
payload = {
"name": "<string>",
"threshold": 123,
"tool_name": "<string>",
"client_name": "<string>",
"min_calls": 50000,
"channels": [],
"enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
threshold: 123,
tool_name: '<string>',
client_name: '<string>',
min_calls: 50000,
channels: [],
enabled: true
})
};
fetch('https://mcpulse-production.up.railway.app/v1/alerts/{alertId}', 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://mcpulse-production.up.railway.app/v1/alerts/{alertId}",
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>',
'threshold' => 123,
'tool_name' => '<string>',
'client_name' => '<string>',
'min_calls' => 50000,
'channels' => [
],
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"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://mcpulse-production.up.railway.app/v1/alerts/{alertId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"tool_name\": \"<string>\",\n \"client_name\": \"<string>\",\n \"min_calls\": 50000,\n \"channels\": [],\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://mcpulse-production.up.railway.app/v1/alerts/{alertId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"tool_name\": \"<string>\",\n \"client_name\": \"<string>\",\n \"min_calls\": 50000,\n \"channels\": [],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mcpulse-production.up.railway.app/v1/alerts/{alertId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"tool_name\": \"<string>\",\n \"client_name\": \"<string>\",\n \"min_calls\": 50000,\n \"channels\": [],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodynullPath Parameters
Body
application/json
Required string length:
1 - 80Available options:
first_call_rate, error_rate, empty_rate, crash_rate, slow_rate, avg_response_bytes, calls Available options:
below, above Minimum string length:
1Minimum string length:
1Required range:
1 <= x <= 100000Minimum array length:
1Available options:
in_app, email Response
OK
The response is of type unknown.
⌘I
Update Alert
curl --request PATCH \
--url https://mcpulse-production.up.railway.app/v1/alerts/{alertId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"threshold": 123,
"tool_name": "<string>",
"client_name": "<string>",
"min_calls": 50000,
"channels": [],
"enabled": true
}
'import requests
url = "https://mcpulse-production.up.railway.app/v1/alerts/{alertId}"
payload = {
"name": "<string>",
"threshold": 123,
"tool_name": "<string>",
"client_name": "<string>",
"min_calls": 50000,
"channels": [],
"enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
threshold: 123,
tool_name: '<string>',
client_name: '<string>',
min_calls: 50000,
channels: [],
enabled: true
})
};
fetch('https://mcpulse-production.up.railway.app/v1/alerts/{alertId}', 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://mcpulse-production.up.railway.app/v1/alerts/{alertId}",
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>',
'threshold' => 123,
'tool_name' => '<string>',
'client_name' => '<string>',
'min_calls' => 50000,
'channels' => [
],
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"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://mcpulse-production.up.railway.app/v1/alerts/{alertId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"tool_name\": \"<string>\",\n \"client_name\": \"<string>\",\n \"min_calls\": 50000,\n \"channels\": [],\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://mcpulse-production.up.railway.app/v1/alerts/{alertId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"tool_name\": \"<string>\",\n \"client_name\": \"<string>\",\n \"min_calls\": 50000,\n \"channels\": [],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mcpulse-production.up.railway.app/v1/alerts/{alertId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"tool_name\": \"<string>\",\n \"client_name\": \"<string>\",\n \"min_calls\": 50000,\n \"channels\": [],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodynull