Python
from meibel import MeibelClient
client = MeibelClient(api_key="your-api-key")
# Create request body
body = UpdateExecutionPolicyRequest(name="Example")
result = client.execution_policies.update("policy_id_value", body=body)
print(result)import { MeibelClient } from 'meibel';
const client = new MeibelClient({ apiKey: 'your-api-key' });
// Create request body
const body = { name: 'Example' };
const result = await client.executionPolicies.update('policy_id_value', body);
console.log(result);import v2 "github.com/meibel-ai/meibel-go/v2"
client := v2.NewClient(v2.WithAPIKey("your-api-key"))
ctx := context.Background()
// Create request body
body := v2.UpdateExecutionPolicyRequest{
Name: "Example",
}
result, err := client.ExecutionPolicies.Update(ctx, "policy_id_value", body)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)curl --request PUT \
--url https://api.meibel.ai/v2/execution-policies/{policy_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"name": "eu-restricted-read-only-v2",
"description": "Updated EU restriction with additional tool block",
"execution_policy": {
"datasources": {
"ds_abc123": {
"tables": {
"filter": {
"table.__name__": {
"$in": [
"orders",
"customers"
]
},
"orders.region": {
"$eq": "EU"
}
},
"hidden_columns": {
"customers": [
"ssn",
"credit_card"
]
}
},
"documents": {
"filter": {
"data_element.__id__": {
"$in": [
"de_abc",
"de_def"
]
}
}
}
},
"ds_xyz789": {
"disabled": true
}
},
"tools": {
"send_email": {
"variables": {
"to": {
"$eq": "support@acme.com"
},
"max_attachments": {
"$lte": 3
}
}
},
"web_search": {
"disabled": true
}
}
}
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'eu-restricted-read-only-v2',
description: 'Updated EU restriction with additional tool block',
execution_policy: {
datasources: {
ds_abc123: {
tables: {
filter: {'table.__name__': {$in: ['orders', 'customers']}, 'orders.region': {$eq: 'EU'}},
hidden_columns: {customers: ['ssn', 'credit_card']}
},
documents: {filter: {'data_element.__id__': {$in: ['de_abc', 'de_def']}}}
},
ds_xyz789: {disabled: true}
},
tools: {
send_email: {variables: {to: {$eq: 'support@acme.com'}, max_attachments: {$lte: 3}}},
web_search: {disabled: true}
}
}
})
};
fetch('https://api.meibel.ai/v2/execution-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.meibel.ai/v2/execution-policies/{policy_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'eu-restricted-read-only-v2',
'description' => 'Updated EU restriction with additional tool block',
'execution_policy' => [
'datasources' => [
'ds_abc123' => [
'tables' => [
'filter' => [
'table.__name__' => [
'$in' => [
'orders',
'customers'
]
],
'orders.region' => [
'$eq' => 'EU'
]
],
'hidden_columns' => [
'customers' => [
'ssn',
'credit_card'
]
]
],
'documents' => [
'filter' => [
'data_element.__id__' => [
'$in' => [
'de_abc',
'de_def'
]
]
]
]
],
'ds_xyz789' => [
'disabled' => true
]
],
'tools' => [
'send_email' => [
'variables' => [
'to' => [
'$eq' => 'support@acme.com'
],
'max_attachments' => [
'$lte' => 3
]
]
],
'web_search' => [
'disabled' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.meibel.ai/v2/execution-policies/{policy_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"eu-restricted-read-only-v2\",\n \"description\": \"Updated EU restriction with additional tool block\",\n \"execution_policy\": {\n \"datasources\": {\n \"ds_abc123\": {\n \"tables\": {\n \"filter\": {\n \"table.__name__\": {\n \"$in\": [\n \"orders\",\n \"customers\"\n ]\n },\n \"orders.region\": {\n \"$eq\": \"EU\"\n }\n },\n \"hidden_columns\": {\n \"customers\": [\n \"ssn\",\n \"credit_card\"\n ]\n }\n },\n \"documents\": {\n \"filter\": {\n \"data_element.__id__\": {\n \"$in\": [\n \"de_abc\",\n \"de_def\"\n ]\n }\n }\n }\n },\n \"ds_xyz789\": {\n \"disabled\": true\n }\n },\n \"tools\": {\n \"send_email\": {\n \"variables\": {\n \"to\": {\n \"$eq\": \"support@acme.com\"\n },\n \"max_attachments\": {\n \"$lte\": 3\n }\n }\n },\n \"web_search\": {\n \"disabled\": true\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/execution-policies/{policy_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"eu-restricted-read-only-v2\",\n \"description\": \"Updated EU restriction with additional tool block\",\n \"execution_policy\": {\n \"datasources\": {\n \"ds_abc123\": {\n \"tables\": {\n \"filter\": {\n \"table.__name__\": {\n \"$in\": [\n \"orders\",\n \"customers\"\n ]\n },\n \"orders.region\": {\n \"$eq\": \"EU\"\n }\n },\n \"hidden_columns\": {\n \"customers\": [\n \"ssn\",\n \"credit_card\"\n ]\n }\n },\n \"documents\": {\n \"filter\": {\n \"data_element.__id__\": {\n \"$in\": [\n \"de_abc\",\n \"de_def\"\n ]\n }\n }\n }\n },\n \"ds_xyz789\": {\n \"disabled\": true\n }\n },\n \"tools\": {\n \"send_email\": {\n \"variables\": {\n \"to\": {\n \"$eq\": \"support@acme.com\"\n },\n \"max_attachments\": {\n \"$lte\": 3\n }\n }\n },\n \"web_search\": {\n \"disabled\": true\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"customer_id": "<string>",
"project_id": "<string>",
"name": "<string>",
"execution_policy": {
"datasources": {},
"tools": {}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Execution Policies
Update Execution Policy
PUT
/
execution-policies
/
{policy_id}
Python
from meibel import MeibelClient
client = MeibelClient(api_key="your-api-key")
# Create request body
body = UpdateExecutionPolicyRequest(name="Example")
result = client.execution_policies.update("policy_id_value", body=body)
print(result)import { MeibelClient } from 'meibel';
const client = new MeibelClient({ apiKey: 'your-api-key' });
// Create request body
const body = { name: 'Example' };
const result = await client.executionPolicies.update('policy_id_value', body);
console.log(result);import v2 "github.com/meibel-ai/meibel-go/v2"
client := v2.NewClient(v2.WithAPIKey("your-api-key"))
ctx := context.Background()
// Create request body
body := v2.UpdateExecutionPolicyRequest{
Name: "Example",
}
result, err := client.ExecutionPolicies.Update(ctx, "policy_id_value", body)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)curl --request PUT \
--url https://api.meibel.ai/v2/execution-policies/{policy_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"name": "eu-restricted-read-only-v2",
"description": "Updated EU restriction with additional tool block",
"execution_policy": {
"datasources": {
"ds_abc123": {
"tables": {
"filter": {
"table.__name__": {
"$in": [
"orders",
"customers"
]
},
"orders.region": {
"$eq": "EU"
}
},
"hidden_columns": {
"customers": [
"ssn",
"credit_card"
]
}
},
"documents": {
"filter": {
"data_element.__id__": {
"$in": [
"de_abc",
"de_def"
]
}
}
}
},
"ds_xyz789": {
"disabled": true
}
},
"tools": {
"send_email": {
"variables": {
"to": {
"$eq": "support@acme.com"
},
"max_attachments": {
"$lte": 3
}
}
},
"web_search": {
"disabled": true
}
}
}
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'eu-restricted-read-only-v2',
description: 'Updated EU restriction with additional tool block',
execution_policy: {
datasources: {
ds_abc123: {
tables: {
filter: {'table.__name__': {$in: ['orders', 'customers']}, 'orders.region': {$eq: 'EU'}},
hidden_columns: {customers: ['ssn', 'credit_card']}
},
documents: {filter: {'data_element.__id__': {$in: ['de_abc', 'de_def']}}}
},
ds_xyz789: {disabled: true}
},
tools: {
send_email: {variables: {to: {$eq: 'support@acme.com'}, max_attachments: {$lte: 3}}},
web_search: {disabled: true}
}
}
})
};
fetch('https://api.meibel.ai/v2/execution-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.meibel.ai/v2/execution-policies/{policy_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'eu-restricted-read-only-v2',
'description' => 'Updated EU restriction with additional tool block',
'execution_policy' => [
'datasources' => [
'ds_abc123' => [
'tables' => [
'filter' => [
'table.__name__' => [
'$in' => [
'orders',
'customers'
]
],
'orders.region' => [
'$eq' => 'EU'
]
],
'hidden_columns' => [
'customers' => [
'ssn',
'credit_card'
]
]
],
'documents' => [
'filter' => [
'data_element.__id__' => [
'$in' => [
'de_abc',
'de_def'
]
]
]
]
],
'ds_xyz789' => [
'disabled' => true
]
],
'tools' => [
'send_email' => [
'variables' => [
'to' => [
'$eq' => 'support@acme.com'
],
'max_attachments' => [
'$lte' => 3
]
]
],
'web_search' => [
'disabled' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.meibel.ai/v2/execution-policies/{policy_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"eu-restricted-read-only-v2\",\n \"description\": \"Updated EU restriction with additional tool block\",\n \"execution_policy\": {\n \"datasources\": {\n \"ds_abc123\": {\n \"tables\": {\n \"filter\": {\n \"table.__name__\": {\n \"$in\": [\n \"orders\",\n \"customers\"\n ]\n },\n \"orders.region\": {\n \"$eq\": \"EU\"\n }\n },\n \"hidden_columns\": {\n \"customers\": [\n \"ssn\",\n \"credit_card\"\n ]\n }\n },\n \"documents\": {\n \"filter\": {\n \"data_element.__id__\": {\n \"$in\": [\n \"de_abc\",\n \"de_def\"\n ]\n }\n }\n }\n },\n \"ds_xyz789\": {\n \"disabled\": true\n }\n },\n \"tools\": {\n \"send_email\": {\n \"variables\": {\n \"to\": {\n \"$eq\": \"support@acme.com\"\n },\n \"max_attachments\": {\n \"$lte\": 3\n }\n }\n },\n \"web_search\": {\n \"disabled\": true\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/execution-policies/{policy_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"eu-restricted-read-only-v2\",\n \"description\": \"Updated EU restriction with additional tool block\",\n \"execution_policy\": {\n \"datasources\": {\n \"ds_abc123\": {\n \"tables\": {\n \"filter\": {\n \"table.__name__\": {\n \"$in\": [\n \"orders\",\n \"customers\"\n ]\n },\n \"orders.region\": {\n \"$eq\": \"EU\"\n }\n },\n \"hidden_columns\": {\n \"customers\": [\n \"ssn\",\n \"credit_card\"\n ]\n }\n },\n \"documents\": {\n \"filter\": {\n \"data_element.__id__\": {\n \"$in\": [\n \"de_abc\",\n \"de_def\"\n ]\n }\n }\n }\n },\n \"ds_xyz789\": {\n \"disabled\": true\n }\n },\n \"tools\": {\n \"send_email\": {\n \"variables\": {\n \"to\": {\n \"$eq\": \"support@acme.com\"\n },\n \"max_attachments\": {\n \"$lte\": 3\n }\n }\n },\n \"web_search\": {\n \"disabled\": true\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"customer_id": "<string>",
"project_id": "<string>",
"name": "<string>",
"execution_policy": {
"datasources": {},
"tools": {}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
application/json
Response
Successful Response
ExecutionPolicyResponse
Session-level access constraints (hardrails) for data and tools. Controls what data an agent session can access and what tools it can use. Constraints are enforced by the platform at runtime — the agent cannot bypass them. Multiple policies can be composed: stored policies (by ID) and/or an inline policy are structurally merged. Overlapping datasource or tool entries are combined with $and (intersection semantics). All filter fields use MongoDB-style constraint operators. Plain values are automatically normalized to {"$eq": value}.
Show child attributes
Show child attributes
Was this page helpful?
⌘I