curl --request PATCH \
--url https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId} \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"params": {
"threshold_percent": 99.5,
"window_hours": 24
},
"destination_id": "<string>",
"cooldown_minutes": 5042,
"enabled": true,
"muted_until": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}"
payload = {
"params": {
"threshold_percent": 99.5,
"window_hours": 24
},
"destination_id": "<string>",
"cooldown_minutes": 5042,
"enabled": True,
"muted_until": "2023-11-07T05:31:56Z"
}
headers = {
"cookie": "apsio_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'apsio_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
params: {threshold_percent: 99.5, window_hours: 24},
destination_id: '<string>',
cooldown_minutes: 5042,
enabled: true,
muted_until: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}', 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.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}",
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([
'params' => [
'threshold_percent' => 99.5,
'window_hours' => 24
],
'destination_id' => '<string>',
'cooldown_minutes' => 5042,
'enabled' => true,
'muted_until' => '2023-11-07T05:31:56Z'
]),
CURLOPT_COOKIE => "apsio_session=",
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://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}"
payload := strings.NewReader("{\n \"params\": {\n \"threshold_percent\": 99.5,\n \"window_hours\": 24\n },\n \"destination_id\": \"<string>\",\n \"cooldown_minutes\": 5042,\n \"enabled\": true,\n \"muted_until\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "apsio_session=")
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://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"params\": {\n \"threshold_percent\": 99.5,\n \"window_hours\": 24\n },\n \"destination_id\": \"<string>\",\n \"cooldown_minutes\": 5042,\n \"enabled\": true,\n \"muted_until\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'apsio_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {\n \"threshold_percent\": 99.5,\n \"window_hours\": 24\n },\n \"destination_id\": \"<string>\",\n \"cooldown_minutes\": 5042,\n \"enabled\": true,\n \"muted_until\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_bodyChange, enable, disable or mute a rule (owners, admins)
New parameters, another destination or disabling it start the rule over (ok, nothing sent).
curl --request PATCH \
--url https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId} \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"params": {
"threshold_percent": 99.5,
"window_hours": 24
},
"destination_id": "<string>",
"cooldown_minutes": 5042,
"enabled": true,
"muted_until": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}"
payload = {
"params": {
"threshold_percent": 99.5,
"window_hours": 24
},
"destination_id": "<string>",
"cooldown_minutes": 5042,
"enabled": True,
"muted_until": "2023-11-07T05:31:56Z"
}
headers = {
"cookie": "apsio_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'apsio_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
params: {threshold_percent: 99.5, window_hours: 24},
destination_id: '<string>',
cooldown_minutes: 5042,
enabled: true,
muted_until: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}', 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.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}",
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([
'params' => [
'threshold_percent' => 99.5,
'window_hours' => 24
],
'destination_id' => '<string>',
'cooldown_minutes' => 5042,
'enabled' => true,
'muted_until' => '2023-11-07T05:31:56Z'
]),
CURLOPT_COOKIE => "apsio_session=",
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://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}"
payload := strings.NewReader("{\n \"params\": {\n \"threshold_percent\": 99.5,\n \"window_hours\": 24\n },\n \"destination_id\": \"<string>\",\n \"cooldown_minutes\": 5042,\n \"enabled\": true,\n \"muted_until\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "apsio_session=")
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://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"params\": {\n \"threshold_percent\": 99.5,\n \"window_hours\": 24\n },\n \"destination_id\": \"<string>\",\n \"cooldown_minutes\": 5042,\n \"enabled\": true,\n \"muted_until\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/alerts/rules/{ruleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'apsio_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {\n \"threshold_percent\": 99.5,\n \"window_hours\": 24\n },\n \"destination_id\": \"<string>\",\n \"cooldown_minutes\": 5042,\n \"enabled\": true,\n \"muted_until\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
The console session, set by /v1/auth/callback (__Host-apsio_session when host-only).
Path Parameters
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
Body
The preset's parameters. crash_free_below: threshold_percent (50 to 99.99), window_hours (1 to 168, default 24), min_sessions (default 100), release. new_issue: min_occurrences (default 1), release. issue_spike: factor (2 to 1000, default 5; the last hour against the 7-day hourly mean), min_occurrences (default 20). endpoint_failure_above: threshold_percent (0.1 to 100), window_hours (1 to 24, default 1), min_requests (default 100), method, host, template.
Show child attributes
Show child attributes
{ "threshold_percent": 99.5, "window_hours": 24 }
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$5 <= x <= 10080Muted until then (at most 30 days); null unmutes.
Response
The rule