Skip to main content

aiWebSearchSetActiveConfig

AiSuccessResponse aiWebSearchSetActiveConfig(AiWebSearchSetActiveConfigRequest)

PUT /api/2.0/ai/web-search/set-active-config

Set active config

Stores a web-search configuration without contacting the provider first, for a form that has already validated its input or for restoring a known-good configuration. entityId scopes it to a room and has to name one the caller can open. A baseUrl pointing at a private network address is still refused, because that check is local. Nothing guarantees the stored provider works: follow up with POST api/2.0/ai/web-search/test-connection, or use PUT api/2.0/ai/web-search/configure to have the store gated on a live probe.

Parameters​

NameInTypeDescriptionNotes
AiWebSearchSetActiveConfigRequestbodyAiWebSearchSetActiveConfigRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the configuration was stored, unverified.AiSuccessResponse-
400The configuration is missing or malformed, or the provider URL points at a private network address.AiErrorResponse-
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