Skip to main content

aiWebSearchTestConnection

aiProfilesTestConnection_200_response aiWebSearchTestConnection(AiWebSearchConfig)

POST /api/2.0/ai/web-search/test-connection

Test a web-search provider

Probes a web-search configuration against the live provider and reports the outcome, storing nothing - this is what a Test button calls so that a failure commits no state. The configuration is taken from the request rather than from storage, so credentials that were never saved can be checked. A baseUrl pointing at a private network address is refused before any request leaves the portal. The verdict is carried in the body rather than in the status, so a failed probe still answers 200 and the caller has to read the payload.

Parameters​

NameInTypeDescriptionNotes
AiWebSearchConfigbodyAiWebSearchConfig[required]

Responses​

Status codeDescriptionTypeResponse headers
200The outcome of the probe. A failed probe is reported here, not as a status.aiProfilesTestConnection_200_response-
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-
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​

aiProfilesTestConnection_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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