Read the organization's alert settings
curl --request GET \
--url https://app.trustivan.com/api/v1/notifications/settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/notifications/settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/notifications/settings', 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://app.trustivan.com/api/v1/notifications/settings"
req, _ := http.NewRequest("GET", 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))
}{
"email_findings": true,
"email_verdicts": true,
"email_recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slack_findings": true,
"slack_verdicts": true,
"email_sla_breaches": true,
"slack_sla_breaches": true,
"slack_configured": true,
"email_available": true,
"updated_at": "2023-11-07T05:31:56Z"
}Read the organization's alert settings
Which events are mailed, to which members, and whether a Slack
incoming webhook is configured (never the URL: it is a credential).
email_available is false when the deployment has no mail. Requires
members:read, because the recipients are members.
GET
/
notifications
/
settings
Read the organization's alert settings
curl --request GET \
--url https://app.trustivan.com/api/v1/notifications/settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/notifications/settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/notifications/settings', 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://app.trustivan.com/api/v1/notifications/settings"
req, _ := http.NewRequest("GET", 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))
}{
"email_findings": true,
"email_verdicts": true,
"email_recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slack_findings": true,
"slack_verdicts": true,
"email_sla_breaches": true,
"slack_sla_breaches": true,
"slack_configured": true,
"email_available": true,
"updated_at": "2023-11-07T05:31:56Z"
}