> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capedigital.co.ke/llms.txt
> Use this file to discover all available pages before exploring further.

# List tasks



## OpenAPI

````yaml /openapi/assignment.yaml get /api/v1/tasks
openapi: 3.1.0
info:
  title: Assignment Service
  description: Centralised task-assignment hub for workflow-driven organisations.
  version: 1.0.0
servers:
  - url: https://api.capedigital.co.ke/assignment
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/tasks:
    get:
      tags:
        - tasks
      summary: List tasks
      operationId: list_tasks_api_v1_tasks_get
      parameters:
        - name: engine_request
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Engine Request
        - name: workflow_node_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Workflow Node Code
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/TaskStatus'
              - type: 'null'
            title: Status
        - name: assigned_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Assigned To
        - name: source_service
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Source Service
        - name: entity_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Entity Type
        - name: entity_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Entity Id
        - name: entity_reference
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Entity Reference
        - name: required_permission
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter tasks whose required_permissions_snapshot contains this
              permission string.
            title: Required Permission
          description: >-
            Filter tasks whose required_permissions_snapshot contains this
            permission string.
        - name: unassigned
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              If true, return only unassigned tasks (assigned_to IS NULL). If
              false, return only assigned tasks.
            title: Unassigned
          description: >-
            If true, return only unassigned tasks (assigned_to IS NULL). If
            false, return only assigned tasks.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskStatus:
      type: string
      enum:
        - OPEN
        - IN_PROGRESS
        - DONE
        - BLOCKED
        - CANCELLED
      title: TaskStatus
    TaskListResponse:
      properties:
        total:
          type: integer
          title: Total
        data:
          items:
            $ref: '#/components/schemas/TaskResponse'
          type: array
          title: Data
      type: object
      required:
        - total
        - data
      title: TaskListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          type: string
          enum:
            - OPEN
            - IN_PROGRESS
            - DONE
            - BLOCKED
            - CANCELLED
          title: Status
        priority:
          type: string
          enum:
            - LOW
            - MEDIUM
            - HIGH
            - URGENT
          title: Priority
        engine_request:
          anyOf:
            - type: string
            - type: 'null'
          title: Engine Request
        workflow_node_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Node Code
        node_preview_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Node Preview Name
        node_instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Node Instructions
        required_permissions_snapshot:
          anyOf:
            - items:
                type: object
              type: array
            - type: 'null'
          title: Required Permissions Snapshot
        assigned_to:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Assigned To
        assigned_to_user:
          anyOf:
            - type: object
            - type: 'null'
          title: Assigned To User
        assigned_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Assigned At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        due_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Due At
        escalation_level:
          type: integer
          title: Escalation Level
          default: 0
        source_service:
          type: string
          title: Source Service
        entity_type:
          type: string
          title: Entity Type
        entity_id:
          type: string
          format: uuid
          title: Entity Id
        entity_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Reference
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
      type: object
      required:
        - id
        - status
        - priority
        - engine_request
        - workflow_node_code
        - node_preview_name
        - node_instructions
        - required_permissions_snapshot
        - assigned_to
        - assigned_at
        - completed_at
        - due_at
        - source_service
        - entity_type
        - entity_id
        - entity_reference
        - created_at
        - updated_at
        - deleted_at
      title: TaskResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````