Skip to main content

aiWebSearchConfigure

AiWebSearchMutationResult aiWebSearchConfigure(AiWebSearchConfigureRequest)

PUT /api/2.0/ai/web-search/configure

Configure and verify web search

Validates a web-search configuration against the live provider and stores it only if the provider answers, which makes it the safe way to save a form in one step. entityId scopes the configuration to a room and has to name one the caller can open; omitting it configures the portal. A baseUrl pointing at a private network address is refused. Use PUT api/2.0/ai/web-search/set-active-config when the configuration should be stored without a provider round trip.

Parameters​

NameInTypeDescriptionNotes
AiWebSearchConfigureRequestbodyAiWebSearchConfigureRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200The stored configuration, after the provider accepted it.AiWebSearchMutationResult-
400The configuration is missing or malformed, the provider URL points at a private network address, or the provider refused the configuration - the body then carries success: false and an error naming the field. Nothing is stored in any of these cases.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​

AiWebSearchMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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