Deployments.ai Docs
Tools

Update a tool policy

PATCH /v1/tool-policies/{id} · SDK updateToolPolicy · CLI deployments tool-policy update

PATCH
/v1/tool-policies/{id}

Authorization

platformBearer
headerAuthorizationBearer <token>

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

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

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
expectedVersion*integer
Range0 <= value
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 PATCH "https://example.com/v1/tool-policies/string" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "expectedVersion": 0  }'
{  "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}