跳到主要内容

aiWebSearchGetActiveConfig

AiWebSearchConfig aiWebSearchGetActiveConfig(entityId)

GET /api/2.0/ai/web-search/get-active-config

Get active config

Returns the web-search configuration in force for a scope - the provider, its endpoint and its settings. entityId picks a room and has to name one the caller can open; omitting it reads the portal-wide configuration, and a room with none of its own falls back to that. An unconfigured scope answers an empty result rather than 404. The provider key is not part of the answer, so a client cannot read it back after storing it.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The configuration in force for the scope, without the provider key, or an empty result when web search is not configured.AiWebSearchConfig-
400entityId is not a string.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-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiWebSearchConfig

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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