Regenerate an alert rule's webhook signing secret
curl --request POST \
--url https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/regenerate-webhook-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/regenerate-webhook-secret"
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}/regenerate-webhook-secret', 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}/regenerate-webhook-secret",
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}/regenerate-webhook-secret"
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}/regenerate-webhook-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/regenerate-webhook-secret")
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{
"webhookSigningSecret": "whsec_Zm9vYmFyYmF6"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Regenerate an alert rule's webhook signing secret
Generates a new secret, returns it once, and stops the old one at once. The rule must have a webhook URL, or the route answers 400. It is the only way to get a signing secret: create and update never return the one they generate.
POST
/
monitors
/
{monitorId}
/
alert-rules
/
{alertRuleId}
/
regenerate-webhook-secret
Regenerate an alert rule's webhook signing secret
curl --request POST \
--url https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/regenerate-webhook-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/regenerate-webhook-secret"
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}/regenerate-webhook-secret', 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}/regenerate-webhook-secret",
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}/regenerate-webhook-secret"
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}/regenerate-webhook-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/monitors/{monitorId}/alert-rules/{alertRuleId}/regenerate-webhook-secret")
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{
"webhookSigningSecret": "whsec_Zm9vYmFyYmF6"
}{
"error": "Error type",
"message": "Error message description"
}{
"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
Signing secret regenerated successfully
The new signing secret, shown once. The previous secret stops working at once.
Example:
"whsec_Zm9vYmFyYmF6"