Skip to main content
GET
/
orgs
/
{org_id}
/
k2
/
{kb_id}
/
policies
/
{policy_id}
cURL
curl --request GET \
  --url https://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id}', 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://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id}",
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://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id}"

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://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/policies/{policy_id}")

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
{
  "break_glass_allowed": true,
  "compliance_tags": [
    "<string>"
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "enabled": true,
  "id": "<string>",
  "kb_id": "<string>",
  "labels": {},
  "name": "<string>",
  "purpose_tags": [
    "<string>"
  ],
  "revision": 123,
  "row_filter_dsl": {},
  "updated_at": "2023-11-07T05:31:56Z",
  "column_masks": {},
  "description": "<string>",
  "external_id": "<string>",
  "table_name": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required
kb_id
string
required
policy_id
string
required

Response

Policy

audit_level
enum<string>
required

Audit verbosity for matches against this rule.

Available options:
none,
normal,
verbose
break_glass_allowed
boolean
required

Whether sessions may bypass the rule via a logged escalation.

compliance_tags
string[]
required

Compliance classifications (e.g. hipaa.phi, pci.pan).

created_at
string<date-time>
required
enabled
boolean
required

When false, the rule body is inactive everywhere it is bound.

id
string
required
kb_id
string
required
labels
object
required

Free-form key/value labels.

name
string
required

Operator-facing label.

purpose_tags
string[]
required

Purpose-of-use bindings (e.g. treatment, research).

revision
integer<int32>
required

Revision token for optimistic concurrency on update and delete.

row_filter_dsl
object
required

Row predicate authored as JSON. Stored opaquely in this release.

source
enum<string>
required

Provenance of the rule.

Available options:
manual,
imported,
derived
updated_at
string<date-time>
required
column_masks
null | object

Per-column transformation map. Null means no masks. {"col": {"type":"redact"}} is the canonical "hide this column".

description
string | null
external_id
string | null
table_name
string | null

Target table within the knowledge base. Null applies to every table.