跳到主要内容

aiAttachmentsGetMany

List aiAttachmentsGetMany(AiAttachmentsGetManyRequest)

POST /api/2.0/ai/attachments/get-many

Get many

Returns several attachments in one call, aligned by position with the ids that were sent, so the answer can be zipped straight onto the request. An ID that no longer exists leaves its slot empty rather than shortening the list, which is how a caller tells which of them are gone. ids has to be present and non-empty - an empty batch is rejected rather than answered with an empty list. Nothing is changed by the call.

Parameters​

NameInTypeDescriptionNotes
AiAttachmentsGetManyRequestbodyListThe IDs of the attachments to read, as a bare JSON array of strings. The answer is aligned with this array by position.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The attachments, aligned by position with the IDs that were sent. A missing one leaves its slot empty.List-
400The list of attachment IDs is malformed.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​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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