Tools
Create a tool policy
POST /v1/tool-policies · SDK createToolPolicy · CLI deployments tool-policy create
POST
platformBearerheader
AuthorizationBearer <token>Platform bearer credential accepted as an opaque API key or JWT.
x-deployments-environment*stringMatch
^[0-7][0-9A-HJKMNP-TV-Z]{25}$idempotency-key*stringLength
1 <= length <= 512application/json- body
description?stringname*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
1 <= length <= 120policy*ToolPolicyResponse
application/json- response
createdAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timedescription?stringid*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$name*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
1 <= length <= 120policy*status*stringupdatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeversion*integerRange
0 <= valuecurl -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}