Skip to main content

Assignments

Tags: assignments, tasks, workflow

Endpoints

List

GET /api/v2/w/{workspace_uuid}/assignments

Description:

Task and workflow assignments

List assignments with pagination.

Self-access: Users can always list their own assignments (mine=True forced). Admin access: ASSIGNMENTS_READ scope required to list all assignments or to filter by a memberId other than the caller's own.

Authentication: Requires workspace member

Parameters:

  • page (Integer)
  • pageSize (Integer)
  • sortBy (AssignmentSortField)
  • sortOrder (SortOrder)
  • mine (Boolean)
  • taskId (Integer)
  • memberId (Integer)
  • status (String)

Response: See PaginatedResponse[AssignmentResponse]


Create

POST /api/v2/w/{workspace_uuid}/assignments

Description:

Task and workflow assignments

Create a new assignment.

Requires workflow USE permission (checked by CreateAssignmentRequest).

Authentication: Requires workspace member

Parameters:

  • request_body (CreateAssignmentRequest)

Response: See AssignmentResponse


Get Assignment Id

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}

Description:

Task and workflow assignments

Get a specific assignment by ID.

Self-access: Users can view their own assignments. Admin access: ASSIGNMENTS_READ scope required to view other members' assignments.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: See AssignmentResponse


Update Assignment Id

PUT /api/v2/w/{workspace_uuid}/assignments/{assignment_id}

Description:

Task and workflow assignments

Update an existing assignment.

Self-access: Users can update their own assignments. Admin access: ASSIGNMENTS_WRITE scope required to update other members' assignments.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • request_body (UpdateAssignmentRequest)

Response: See AssignmentResponse


Cancel

POST /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/cancel

Description:

Task and workflow assignments

Cancel an active assignment.

Admin access: ASSIGNMENTS_WRITE scope required to cancel other members' assignments. Self-access: Users can cancel their own assignments.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • request_body (CancelAssignmentRequest)

Response: See AssignmentResponse


Cel Context

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/cel-context

Description:

Task and workflow assignments

Get CEL evaluation context for the current assignment.

Returns a read-only snapshot of the variables used when evaluating task conditions for this Assignment, so the UI can show routing hints. Task switches are still enforced server-side.

Self-access: Users can read context for their own assignments. Admin access: ASSIGNMENTS_READ scope required for other members' assignments.

The response omits member.form_data and member.data (empty maps) so this preview does not expose PHI; the runtime evaluator still has access when conditions reference those fields.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: See dict


Current Task Detail

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/current-task-detail

Description:

Task and workflow assignments

Get rich detail of the current task for operator assignment view.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: See OperatorTaskDetailResponse


Messages

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/messages

Description:

Task and workflow assignments

Get all messages for a specific assignment.

Self-access: Users can view messages for their own assignments. Admin access: ASSIGNMENTS_READ scope required to view other members' messages.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: List of OpenAIMessageResponse


Tasks

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/tasks/{assignment_task_id}

Description:

Task and workflow assignments

Get a specific assignment task by ID.

Self-access: Users can view tasks for their own assignments. Admin access: ASSIGNMENTS_READ scope required to view other members' tasks.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • assignment_task_id (Integer)

Response: See AssignmentTaskResponse


Update Select

PUT /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/tasks/{assignment_task_id}/select

Description:

Task and workflow assignments

Switch the current task for an assignment.

Self-access: Users can switch tasks for their own assignments. Admin access: ASSIGNMENTS_WRITE scope required to switch other members' tasks.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • assignment_task_id (Integer)

Response: See AssignmentTaskResponse