curl --request GET \
--url https://app.kosli.com/api/v2/notification-config/{org}/{notification_type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}', 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://app.kosli.com/api/v2/notification-config/{org}/{notification_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}"
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))
}HttpResponse<String> response = Unirest.get("https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"notification_type": "api_key_expiry",
"scope": "<string>",
"targets": [
{
"type": "SLACK",
"webhook": "<string>"
}
],
"detection": {},
"last_notified_at": 123,
"last_failure": {
"failed_at": 123,
"error": "<string>"
}
}Get notification configuration
Where an org sends one kind of notification Kosli raises itself.
An empty target list means the org has not configured any, and Kosli derives the recipients from what the notification is about.
curl --request GET \
--url https://app.kosli.com/api/v2/notification-config/{org}/{notification_type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}', 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://app.kosli.com/api/v2/notification-config/{org}/{notification_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}"
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))
}HttpResponse<String> response = Unirest.get("https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/notification-config/{org}/{notification_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"notification_type": "api_key_expiry",
"scope": "<string>",
"targets": [
{
"type": "SLACK",
"webhook": "<string>"
}
],
"detection": {},
"last_notified_at": 123,
"last_failure": {
"failed_at": 123,
"error": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
A kind of notification a customer can configure.
A new kind is a new member here, not a new field or a new collection.
api_key_expiry Response
Successful Response
The kind of notification this configuration applies to
api_key_expiry The entity the configuration applies to, or null for the whole org
Where notifications of this type go. Empty when the org has not configured any, in which case Kosli derives the recipients.
- SlackNotificationTargetResponse
- WebhookNotificationTargetResponse
- EmailNotificationTargetResponse
Show child attributes
Show child attributes
What counts as a condition, for the types that have one
When a notification of this type was last sent for the org, as epoch seconds, or null if none has been
The most recent failed delivery, when nothing has been sent since it; null otherwise
Show child attributes
Show child attributes