curl --request POST \
--url https://{host}/api/dlp/admin/v1/field-control-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mcp_server_id": "<string>",
"name": "<string>",
"catalog_unlisted_table_action": "<string>",
"directory_slug": "<string>",
"enabled": true,
"rules": "<unknown>"
}
'import requests
url = "https://{host}/api/dlp/admin/v1/field-control-policies"
payload = {
"mcp_server_id": "<string>",
"name": "<string>",
"catalog_unlisted_table_action": "<string>",
"directory_slug": "<string>",
"enabled": True,
"rules": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mcp_server_id: '<string>',
name: '<string>',
catalog_unlisted_table_action: '<string>',
directory_slug: '<string>',
enabled: true,
rules: '<unknown>'
})
};
fetch('https://{host}/api/dlp/admin/v1/field-control-policies', 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://{host}/api/dlp/admin/v1/field-control-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mcp_server_id' => '<string>',
'name' => '<string>',
'catalog_unlisted_table_action' => '<string>',
'directory_slug' => '<string>',
'enabled' => true,
'rules' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/dlp/admin/v1/field-control-policies"
payload := strings.NewReader("{\n \"mcp_server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"catalog_unlisted_table_action\": \"<string>\",\n \"directory_slug\": \"<string>\",\n \"enabled\": true,\n \"rules\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/dlp/admin/v1/field-control-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mcp_server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"catalog_unlisted_table_action\": \"<string>\",\n \"directory_slug\": \"<string>\",\n \"enabled\": true,\n \"rules\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/dlp/admin/v1/field-control-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mcp_server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"catalog_unlisted_table_action\": \"<string>\",\n \"directory_slug\": \"<string>\",\n \"enabled\": true,\n \"rules\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"created_by": "<string>",
"enabled": true,
"id": "<string>",
"mcp_server_id": "<string>",
"name": "<string>",
"org_id": "<string>",
"rules": "<unknown>",
"updated_at": "<string>",
"updated_by": "<string>",
"version": 123,
"catalog_unlisted_table_action": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Create or replace the field-control policy for an MCP server
curl --request POST \
--url https://{host}/api/dlp/admin/v1/field-control-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mcp_server_id": "<string>",
"name": "<string>",
"catalog_unlisted_table_action": "<string>",
"directory_slug": "<string>",
"enabled": true,
"rules": "<unknown>"
}
'import requests
url = "https://{host}/api/dlp/admin/v1/field-control-policies"
payload = {
"mcp_server_id": "<string>",
"name": "<string>",
"catalog_unlisted_table_action": "<string>",
"directory_slug": "<string>",
"enabled": True,
"rules": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mcp_server_id: '<string>',
name: '<string>',
catalog_unlisted_table_action: '<string>',
directory_slug: '<string>',
enabled: true,
rules: '<unknown>'
})
};
fetch('https://{host}/api/dlp/admin/v1/field-control-policies', 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://{host}/api/dlp/admin/v1/field-control-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mcp_server_id' => '<string>',
'name' => '<string>',
'catalog_unlisted_table_action' => '<string>',
'directory_slug' => '<string>',
'enabled' => true,
'rules' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/dlp/admin/v1/field-control-policies"
payload := strings.NewReader("{\n \"mcp_server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"catalog_unlisted_table_action\": \"<string>\",\n \"directory_slug\": \"<string>\",\n \"enabled\": true,\n \"rules\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/dlp/admin/v1/field-control-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mcp_server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"catalog_unlisted_table_action\": \"<string>\",\n \"directory_slug\": \"<string>\",\n \"enabled\": true,\n \"rules\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/dlp/admin/v1/field-control-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mcp_server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"catalog_unlisted_table_action\": \"<string>\",\n \"directory_slug\": \"<string>\",\n \"enabled\": true,\n \"rules\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"created_by": "<string>",
"enabled": true,
"id": "<string>",
"mcp_server_id": "<string>",
"name": "<string>",
"org_id": "<string>",
"rules": "<unknown>",
"updated_at": "<string>",
"updated_by": "<string>",
"version": 123,
"catalog_unlisted_table_action": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
A Barndoor API key, sent as Authorization: Bearer <key>. Keys are prefixed bdai_ and are opaque — do not attempt to decode one. Interchangeable with an OAuth 2.0 access token.
Body
This server's override for tables no catalog-aware SQL rule covers: allow, block or observe; null clears it back to the org default. Omit to keep the stored value. Ignored unless the catalog SQL controls feature is enabled for the organization.
Seeded directory slug (slack, gdrive). Required when rules contain when.
Response
The stored field-control policy. Returned for both a create and a replace — the handler does not distinguish them in the status code
This server's override for tables no catalog-aware SQL rule covers. Absent when not set, which means the org default applies.