Pause a monitor alert rule
curl --request POST \
--url https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause', 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.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "monitorAlertRule_123",
"monitorId": "monitor_123",
"type": "BAD_SESSION_COUNT",
"metricGroupId": "metricGroup_123",
"window": "ONE_HOUR",
"badSessionScore": 0.5,
"threshold": 3,
"recipients": [
"team@example.com"
],
"userId": "user_123",
"createdAt": "2023-11-07T05:31:56Z",
"pausedAt": null
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Pause a monitor alert rule
Stops checking the rule until it is resumed. An open alert closes as RULE_PAUSED and sends no email. Pausing a paused rule returns it unchanged.
POST
/
monitors
/
{monitorId}
/
alert-rules
/
{alertRuleId}
/
pause
Pause a monitor alert rule
curl --request POST \
--url https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause', 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.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "monitorAlertRule_123",
"monitorId": "monitor_123",
"type": "BAD_SESSION_COUNT",
"metricGroupId": "metricGroup_123",
"window": "ONE_HOUR",
"badSessionScore": 0.5,
"threshold": 3,
"recipients": [
"team@example.com"
],
"userId": "user_123",
"createdAt": "2023-11-07T05:31:56Z",
"pausedAt": null
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Authorizations
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
Path Parameters
Monitor ID
Example:
"monitor_123"
Alert rule ID
Example:
"monitorAlertRule_123"
Response
Alert rule paused successfully
Example:
"monitorAlertRule_123"
Example:
"monitor_123"
Available options:
BAD_SESSION_COUNT, NO_SCORE_RATE, AVERAGE_SCORE Example:
"BAD_SESSION_COUNT"
Example:
"metricGroup_123"
Available options:
FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS, TWENTY_FOUR_HOURS Example:
"ONE_HOUR"
Example:
0.5
Example:
3
Example:
["team@example.com"]
Example:
"user_123"
When the rule was paused; null while it is active
Example:
null