Get an alert rule.
curl --request GET \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"rule": {
"created_at": "2023-11-07T05:31:56Z",
"destination_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"event_types": [],
"group_wait_seconds": 1800,
"name": "<string>",
"notify_resolved": true,
"revision": 2,
"schedule_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"certificate_rule_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count_threshold": 1,
"escalation_after_seconds": 302550,
"finding_filter": {
"confidences": [],
"exposure_kinds": [
"<string>"
],
"q": "<string>",
"severities": [],
"statuses": []
},
"repeat_interval_seconds": 302550
}
}Alert rules
Get an alert rule.
GET
https://api.infrawatch.com/api/v1
/
projects
/
{project_uuid}
/
alerting
/
rules
/
{rule_uuid}
Get an alert rule.
curl --request GET \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/alerting/rules/{rule_uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"rule": {
"created_at": "2023-11-07T05:31:56Z",
"destination_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"event_types": [],
"group_wait_seconds": 1800,
"name": "<string>",
"notify_resolved": true,
"revision": 2,
"schedule_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_membership_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"certificate_rule_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count_threshold": 1,
"escalation_after_seconds": 302550,
"finding_filter": {
"confidences": [],
"exposure_kinds": [
"<string>"
],
"q": "<string>",
"severities": [],
"statuses": []
},
"repeat_interval_seconds": 302550
}
}⌘I