跳到主要内容

aiWebSearchPassthroughContents

Map aiWebSearchPassthroughContents(AiWebSearchPassthroughContentsRequest)

POST /api/2.0/ai/websearch/v1/contents

Web page contents passthrough

Fetches the contents of web pages on behalf of the document editor's AI plugin, against the portal's active web-search provider, exactly as the search passthrough does — including the entityId / entityKind billing attribution. The portal-wide configuration is used and a portal without one answers 404. The provider's status, body and content type are relayed verbatim, so its 429 and its failures surface unchanged. This is the follow-up to POST api/2.0/ai/websearch/v1/search, which returns the results whose contents this operation retrieves.

Parameters​

NameInTypeDescriptionNotes
AiWebSearchPassthroughContentsRequestbodyMapA page-contents request in the shape the portal's active web-search provider expects, forwarded to it unchanged. The endpoint and the key come from the stored configuration.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The provider's own response, relayed verbatim with its status and content type.Map-
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-
404Web search is not configured for this portal.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
429Relayed verbatim from the AI provider, which is rate-limiting this portal's key.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-
502The AI provider could not be reached, or answered with a failure of its own.AiErrorResponse-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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