跳到主要内容

aiAssignmentsBulkAssign

AiBulkAssignmentResult aiAssignmentsBulkAssign(AiAssignmentsBulkAssignRequest)

PUT /api/2.0/ai/assignments/bulk-assign

Bulk assign

Applies many action-to-profile bindings in one write, which is how a settings screen saves the whole set. The body is a plain map of action type to profile ID, and every entry is validated before anything is written: one unknown action or one non-string profile ID rejects the request whole, so the set is never left half-applied. Each entry behaves as the single assign operation does, capability checks included. The answer carries the resulting assignment set.

Parameters​

NameInTypeDescriptionNotes
AiAssignmentsBulkAssignRequestbodyMapA map of action type to profile ID. Every key has to be a known action type and every value a profile ID; one bad entry rejects the whole map.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the set was stored, with errors listing the entries that were refused.AiBulkAssignmentResult-
400The body is not a map of action type to profile ID, or one of its keys is not a known action type.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​

AiBulkAssignmentResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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