跳到主要内容

aiToolsSetAllowAlways

AiSuccessResponse aiToolsSetAllowAlways(AiToolsSetAllowAlwaysRequest)

PUT /api/2.0/ai/tools/set-allow-always

Set allow always

Adds one tool to the scope's always-allow list, or takes it off, which decides whether a call to it pauses the round for approval. value is coerced to a boolean, so any truthy value adds and any falsy one removes. Unlike the disable operation, serverType is not validated here: an unknown one is stored and then simply never matches, so a wrong value fails silently. entityId has to name a room the caller can open.

Parameters​

NameInTypeDescriptionNotes
AiToolsSetAllowAlwaysRequestbodyAiToolsSetAllowAlwaysRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the always-allow list was updated.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API.AiErrorResponse-
404The referenced object does not exist: an unknown or deleted room named by entityId, or an object the caller cannot read - for those the two cases are deliberately indistinguishable.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json