curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/policies/{kind}/{name} \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}"
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('{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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 := "{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}"
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))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "IncidentSLA",
"spec": {
"severity": "critical",
"responseTime": "15m",
"resolutionTime": "1h"
},
"status": {
"activeViolations": 1,
"totalViolations": 2,
"compliancePercentage": 85.7,
"totalIssuesTracked": 14
},
"resourceMeta": {
"name": "critical-sla",
"namespace": "production",
"uid": "c2e7a9d4-1b3f-4a6e-9d80-5f2b7c1e4a90",
"creationTimestamp": "2026-09-01T12:00:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "IncidentSLA not found: incidentslas \"critical-sla\" not found in any namespace"
}
Get Policy
Returns one ApprovalPolicy, NotificationPolicy, EscalationPolicy or IncidentSLA with its raw spec and status
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/policies/{kind}/{name} \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}"
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('{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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 := "{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}"
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))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/policies/{kind}/{name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "IncidentSLA",
"spec": {
"severity": "critical",
"responseTime": "15m",
"resolutionTime": "1h"
},
"status": {
"activeViolations": 1,
"totalViolations": 2,
"compliancePercentage": 85.7,
"totalIssuesTracked": 14
},
"resourceMeta": {
"name": "critical-sla",
"namespace": "production",
"uid": "c2e7a9d4-1b3f-4a6e-9d80-5f2b7c1e4a90",
"creationTimestamp": "2026-09-01T12:00:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "IncidentSLA not found: incidentslas \"critical-sla\" not found in any namespace"
}
approval, notification, escalation or slaviewer. Read-only: any method other than GET returns 405. spec and status are the CRD fields unchanged; resourceMeta carries name, namespace, UID, creation time, labels and annotations.
{
"apiVersion": "v1",
"kind": "IncidentSLA",
"spec": {
"severity": "critical",
"responseTime": "15m",
"resolutionTime": "1h"
},
"status": {
"activeViolations": 1,
"totalViolations": 2,
"compliancePercentage": 85.7,
"totalIssuesTracked": 14
},
"resourceMeta": {
"name": "critical-sla",
"namespace": "production",
"uid": "c2e7a9d4-1b3f-4a6e-9d80-5f2b7c1e4a90",
"creationTimestamp": "2026-09-01T12:00:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "IncidentSLA not found: incidentslas \"critical-sla\" not found in any namespace"
}
Authorizations
API key sent in the X-API-Key header. Keys are read from the Secret chatcli-operator-secrets, key api-keys (fallback: ConfigMap chatcli-operator-config, key api-keys) in the operator namespace, as a YAML list of {key, role, name, description} (name is the identity recorded on approval decisions); the operator chart creates it only with apiKeys.create: true. Roles: viewer < operator < admin — any other role string is denied everywhere. Changes are picked up within about 30 seconds; deleting both the Secret and the ConfigMap revokes every key. With no keys configured every /api/ call returns 401, unless CHATCLI_OPERATOR_DEV_MODE=true, which grants admin without a key (development only).
Path Parameters
approval, notification, escalation or sla.
approval, notification, escalation, sla Policy name.
Query Parameters
Namespace of the object. When omitted, all namespaces are searched and the first object with this name is used.