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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiWebSearchSetActiveConfigRequest | body | AiWebSearchSetActiveConfigRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Confirms the configuration was stored, unverified. | AiSuccessResponse | - |
| 400 | The configuration is missing or malformed, or the provider URL points at a private network address. | 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