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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiWebSearchConfigureRequest | body | AiWebSearchConfigureRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The stored configuration, after the provider accepted it. | AiWebSearchMutationResult | - |
| 400 | The 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 | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI 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 | - |
| 404 | The 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 | - |
| 413 | The request body is larger than 100 KB, the JSON parser's limit on this route. | AiErrorResponse | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json