aiAssignmentsTryResolveForAction
AiResolvedAssignment aiAssignmentsTryResolveForAction(actionType, entityId)
GET /api/2.0/ai/assignments/try-resolve-for-action
Try resolve for action
Returns the profile that will serve one AI action, exactly as GET api/2.0/ai/assignments/resolve-for-action does, but answers with an empty result rather than failing when nothing is configured. actionType is required and is validated the same way, and entityId narrows the lookup to a room. This is the operation to call when the absence of a profile is a normal state to render - a settings screen, or a feature that hides itself. Both operations are read-only.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| actionType | query | String | The AI action the request applies to - one of Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision, FormAnalysis. | [required] [example: Chat] |
| entityId | query | String | The 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 code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The profile that will serve the action, or an empty result when none is configured. | AiResolvedAssignment | - |
| 400 | actionType is missing. | AiErrorResponse | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI 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 | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json