cURL
curl --request GET \
--url https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug} \
--header 'API-Token: <api-key>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}")
.header("API-Token", "<api-key>")
.asString();const options = {method: 'GET', headers: {'API-Token': '<api-key>'}};
fetch('https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}"
headers = {"API-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"notification_policy": {
"name": "<string>",
"bucket_slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"routes": {
"defaults": {
"critical": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
},
"warn": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
}
},
"overrides": [
{
"alert_label_matchers": [
{
"name": "<string>",
"value": "<string>"
}
],
"notifiers": {
"critical": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
},
"warn": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
}
}
}
]
},
"slug": "<string>",
"team_slug": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{}ReadNotificationPolicy
GET
/
api
/
v1
/
config
/
notification-policies
/
{slug}
cURL
curl --request GET \
--url https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug} \
--header 'API-Token: <api-key>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}")
.header("API-Token", "<api-key>")
.asString();const options = {method: 'GET', headers: {'API-Token': '<api-key>'}};
fetch('https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/notification-policies/{slug}"
headers = {"API-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"notification_policy": {
"name": "<string>",
"bucket_slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"routes": {
"defaults": {
"critical": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
},
"warn": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
}
},
"overrides": [
{
"alert_label_matchers": [
{
"name": "<string>",
"value": "<string>"
}
],
"notifiers": {
"critical": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
},
"warn": {
"destinations": [
{
"disable_resolves": true,
"email": {
"addresses": [
"<string>"
]
},
"ops_genie": {
"external_connection_slug": "<string>"
},
"pagerduty": {
"external_connection_slug": "<string>"
},
"slack": {
"channels": [
"<string>"
],
"external_connection_slug": "<string>"
},
"victor_ops": {
"external_connection_slug": "<string>",
"routing_keys": [
"<string>"
]
},
"webhook": {
"external_connection_slug": "<string>",
"query_parameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
],
"disable_repeat": true,
"notifier_slugs": [
"<string>"
],
"repeat_interval_secs": 123
}
}
}
]
},
"slug": "<string>",
"team_slug": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{}⌘I

