curl --request PATCH \
--url https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>"
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status"
payload = { "project_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({project_id: '<string>'})
};
fetch('https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status', 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://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status",
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([
'project_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status"
payload := strings.NewReader("{\n \"project_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"alert": {
"aggregation": "<string>",
"alerted_at": "2023-11-07T05:31:56Z",
"create_time": "2023-11-07T05:31:56Z",
"creator": "<string>",
"filters": [
{
"field": "<string>",
"op": "=",
"value": "<string>",
"key": "<string>"
}
],
"id": "<string>",
"last_error": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"last_evaluated_at": "2023-11-07T05:31:56Z",
"last_notify_at": "2023-11-07T05:31:56Z",
"last_notify_error": "<string>",
"last_notify_status": "<string>",
"measure": "<string>",
"name": "<string>",
"no_data_mode": "<string>",
"renotify": {
"mode": "OFF",
"interval_minutes": 123
},
"severity": "<string>",
"severity_changed_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"threshold": 123,
"threshold_operator": "<string>",
"update_time": "2023-11-07T05:31:56Z",
"view": "<string>",
"window": "<string>"
},
"changed": [
"<string>"
],
"updated": true,
"page_cleared": false,
"state_reset": false
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>"
}Pause or resume an alert
Pause or resume an alert without touching its rule.
Requires MEMBER role or higher in the project’s workspace (the write service decides). Pausing keeps the severity it stopped at; resuming is a cold start (state reset, due now). Setting the status the alert already has is a 200 with nothing changed.
Args:
request (Request): Incoming request (rate-limit plumbing).
response (Response): Outgoing response (rate-limit plumbing).
auth (AccountStampedAuth): Account-scope user auth (session token or
CLI access JWT); its resolved user_id becomes the actor.
alert_id (str): The alert to pause or resume.
payload (AlertStatusRequest): The project and the target status.
_live (None): Write-path liveness gate (blocks a revoked JWT session).
Returns: UpdateAlertResponse: The alert with its new status and the state flags.
Raises: HTTPException: The write service’s 400/403/404/409 verbatim, or a 503 when its response is ambiguous.
curl --request PATCH \
--url https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>"
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status"
payload = { "project_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({project_id: '<string>'})
};
fetch('https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status', 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://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status",
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([
'project_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status"
payload := strings.NewReader("{\n \"project_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/alerts/{alert_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"alert": {
"aggregation": "<string>",
"alerted_at": "2023-11-07T05:31:56Z",
"create_time": "2023-11-07T05:31:56Z",
"creator": "<string>",
"filters": [
{
"field": "<string>",
"op": "=",
"value": "<string>",
"key": "<string>"
}
],
"id": "<string>",
"last_error": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"last_evaluated_at": "2023-11-07T05:31:56Z",
"last_notify_at": "2023-11-07T05:31:56Z",
"last_notify_error": "<string>",
"last_notify_status": "<string>",
"measure": "<string>",
"name": "<string>",
"no_data_mode": "<string>",
"renotify": {
"mode": "OFF",
"interval_minutes": 123
},
"severity": "<string>",
"severity_changed_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"threshold": 123,
"threshold_operator": "<string>",
"update_time": "2023-11-07T05:31:56Z",
"view": "<string>",
"window": "<string>"
},
"changed": [
"<string>"
],
"updated": true,
"page_cleared": false,
"state_reset": false
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Response
Successful Response
The updated alert with its full rule, plus what the edit did to its state.
One alert with its full rule: the summary plus filters and gap handling.
Show child attributes
Show child attributes
True when the alert was firing and the edit discarded that page
True when the edit voided the evaluation state and made the rule due now (any evaluated field changed, or the alert was resumed)

