Acknowledge (mark as seen) monitoring alerts
curl --request POST \
--url https://api.godiligent.ai/monitoring-alerts/acknowledge \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"alert_id": "<string>",
"all": true
}
'import requests
url = "https://api.godiligent.ai/monitoring-alerts/acknowledge"
payload = {
"alert_id": "<string>",
"all": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({alert_id: '<string>', all: true})
};
fetch('https://api.godiligent.ai/monitoring-alerts/acknowledge', 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.godiligent.ai/monitoring-alerts/acknowledge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alert_id' => '<string>',
'all' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.godiligent.ai/monitoring-alerts/acknowledge"
payload := strings.NewReader("{\n \"alert_id\": \"<string>\",\n \"all\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.post("https://api.godiligent.ai/monitoring-alerts/acknowledge")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alert_id\": \"<string>\",\n \"all\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/monitoring-alerts/acknowledge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alert_id\": \"<string>\",\n \"all\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"unacknowledged_count": 123
}{
"errors": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
]
}{
"error": "<string>"
}Monitoring
Acknowledge Monitoring Alerts
Acknowledge (mark as seen) one or all monitoring alerts.
POST
/
monitoring-alerts
/
acknowledge
Acknowledge (mark as seen) monitoring alerts
curl --request POST \
--url https://api.godiligent.ai/monitoring-alerts/acknowledge \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"alert_id": "<string>",
"all": true
}
'import requests
url = "https://api.godiligent.ai/monitoring-alerts/acknowledge"
payload = {
"alert_id": "<string>",
"all": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({alert_id: '<string>', all: true})
};
fetch('https://api.godiligent.ai/monitoring-alerts/acknowledge', 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.godiligent.ai/monitoring-alerts/acknowledge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alert_id' => '<string>',
'all' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.godiligent.ai/monitoring-alerts/acknowledge"
payload := strings.NewReader("{\n \"alert_id\": \"<string>\",\n \"all\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.post("https://api.godiligent.ai/monitoring-alerts/acknowledge")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alert_id\": \"<string>\",\n \"all\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/monitoring-alerts/acknowledge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alert_id\": \"<string>\",\n \"all\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"unacknowledged_count": 123
}{
"errors": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
]
}{
"error": "<string>"
}Overview
Acknowledge (mark as seen) one or all monitoring alerts for the authenticated customer.Request
- Method:
POST - Path:
/monitoring-alerts/acknowledge - Body: JSON object specifying either a single alert ID or all alerts
Request Body
alert_id(string, optional) - ID of the alert to acknowledgeall(boolean, optional) - If true, acknowledges all alerts for the customer- Exactly one of
alert_idorallmust be provided
Example Request (single alert)
{
"alert_id": "532ebbd3-269d-4c8f-b73b-2269eb83f1ae"
}
Example Request (all alerts)
{
"all": true
}
Success Response
- Status: 200 OK
Response Body (single alert)
{
"success": true,
"message": "Alert acknowledged",
"unacknowledged_count": 5
}
Response Body (all alerts)
{
"success": true,
"message": "7 alerts acknowledged",
"unacknowledged_count": 0
}
Error Handling
- 400 Bad Request
- Invalid request body or both
alert_idandallprovided - Example:
{ "error": "Either alert_id OR all must be provided, but not both" }
- Invalid request body or both
- 404 Not Found
- Alert with specified ID was not found
- Example:
{ "error": "Alert not found" }
- 401 Unauthorized
- Missing or invalid customer authentication
- 500 Internal Server Error
- Unexpected server error
Notes
- Only the owner (customer) may acknowledge their alerts
- Bulk acknowledgment returns the number of alerts updated
Authorizations
Body
application/json
⌘I