Policy Insert
policy_insertCreates an Allowlisting policy for specified applications and targets, with permit, deny, or ringfencing actions; use dry_run first to preview the API request before enabling and deploying.
Instructions
Create an Allowlisting policy (POST Policy/PolicyInsert). Required: name, application_ids (GUID list), applies_to ('organization' for entire org, or a computer-group / computer GUID). action: permit (1, default) | deny (2) | permit_with_ringfencing (6). log_action (default true; may only be false for permit). is_enabled defaults to FALSE (policy created disabled) — pass true to enable. add_to_top=true places it first (orderBefore); default appends to the bottom. extra_fields passes through any other KB-documented PolicyInsert field verbatim (e.g. ringfencingOptions, monitorMode, endDate). Run policies_deploy afterwards. dry_run defaults to TRUE. Writes target the configured default org unless organization_id is given explicitly.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"application_ids": "<application_ids>",
"applies_to": "<applies_to>"
},
"name": "policy_insert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| action | No | permit | |
| dry_run | No | Default true: return the exact request(s) that would be sent and the target org, and send nothing. Pass false to execute. | |
| os_type | No | ||
| add_to_top | No | ||
| applies_to | Yes | 'organization' or a group/computer GUID. | |
| is_enabled | No | ||
| log_action | No | ||
| description | No | ||
| extra_fields | No | ||
| application_ids | Yes | ||
| organization_id | No | Target organization GUID for this write. Omit to target the server's configured default org (THREATLOCKER_ORG_ID). Any other org MUST be named explicitly here; write tools have no other org override. |