Deployments.ai Docs
Tools

Create a tool policy

POST /v1/tool-policies · SDK createToolPolicy · CLI deployments tool-policy create

POST
/v1/tool-policies

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Header Parameters

x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
description?string
name*string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 120
policy*

Response Body

ToolPolicyResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
description?string
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
name*string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 120
policy*
status*string
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*integer
Range0 <= value
curl -X POST "https://example.com/v1/tool-policies" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "policy": {      "rules": [        {          "action": "allow"        }      ]    }  }'
{  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "id": "string",  "name": "string",  "policy": {    "defaultAction": "allow",    "defaultReason": "string",    "rules": [      {        "action": "allow",        "connectorProvider": "string",        "effect": "execute",        "providerKey": "string",        "reason": "string",        "requiredScopes": [          "string"        ],        "toolName": "string",        "toolPrefix": "string"      }    ]  },  "status": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0}