curl --request GET \
--url https://app.trustivan.com/api/v1/notification-targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/notification-targets"
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/notification-targets', 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/notification-targets"
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))
}{
"targets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channel": "<string>",
"configured": true,
"events": [
"<string>"
],
"only_blocking": true,
"enabled": true,
"consecutive_failures": 123,
"created_at": "2023-11-07T05:31:56Z",
"config": {},
"min_severity": "critical",
"disabled_at": "2023-11-07T05:31:56Z",
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"secret_rotated_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"events": [
"<string>"
],
"channels": [
"<string>"
]
}The tenant's notification destinations
One row per destination (a Slack channel, a Teams webhook, a SIEM collector, a ticketing project) with what it is subscribed to and how its recent deliveries went.
A destination’s secret is never included, in any response. It is the CUSTOMER’s credential, supplied to TRUSTIVAN and stored encrypted, and there is no endpoint that reads one back.
channels lists what this deployment can deliver to, so a form can be
driven by the API rather than by a hard-coded list. This build renders
eight of them:
| channel | destination | url | secret | config |
|---|---|---|---|---|
slack | Incoming webhook | not used | the webhook URL | not used |
teams | Incoming webhook (Power Automate or a legacy connector) | not used | the webhook URL | not used |
splunk | HTTP Event Collector | the collector URL | the HEC token | index, sourcetype |
datadog | Logs intake | not used | the API key | site |
pagerduty | Events API v2 | not used | the Integration Key | region |
jira | REST API v3 issue | the site’s base URL | the API token | email, project_key, issue_type |
servicenow | Table API record | https://<instance>.service-now.com | the integration user’s password | instance, username, table |
email | this deployment’s own SMTP relay | not used | not used | not used |
Each renderer is verified against recorded fixtures of the published
vendor API: the request it builds, the responses it classifies and the
values it refuses at save time. None of the eight has been exercised
against a live vendor account, so treat a first destination as
unconfirmed until POST /notification-targets/{id}/test has reported a
success on it.
A datadog destination’s site and a pagerduty destination’s
region select the vendor host from a fixed list held in the API; they
are not hostnames, and a value outside the list is refused.
curl --request GET \
--url https://app.trustivan.com/api/v1/notification-targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/notification-targets"
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/notification-targets', 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/notification-targets"
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))
}{
"targets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channel": "<string>",
"configured": true,
"events": [
"<string>"
],
"only_blocking": true,
"enabled": true,
"consecutive_failures": 123,
"created_at": "2023-11-07T05:31:56Z",
"config": {},
"min_severity": "critical",
"disabled_at": "2023-11-07T05:31:56Z",
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"secret_rotated_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"events": [
"<string>"
],
"channels": [
"<string>"
]
}