> ## 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.

# Task audit trail



## OpenAPI

````yaml /openapi/assignment.yaml get /api/v1/tasks/{task_id}/events
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/{task_id}/events:
    get:
      tags:
        - tasks
      summary: Task audit trail
      operationId: get_task_events_api_v1_tasks__task_id__events_get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Task Id
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPage_TaskEventResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CursorPage_TaskEventResponse_:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
        previous:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous
        results:
          items:
            $ref: '#/components/schemas/TaskEventResponse'
          type: array
          title: Results
      type: object
      required:
        - results
      title: CursorPage[TaskEventResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskEventResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        task_id:
          type: string
          format: uuid
          title: Task Id
        event_type:
          type: string
          enum:
            - CREATED
            - ASSIGNED
            - REASSIGNED
            - CLAIMED
            - UNCLAIMED
            - STATUS_CHANGED
            - COMMENTED
            - ESCALATED
          title: Event Type
        old:
          anyOf:
            - type: object
            - type: 'null'
          title: Old
        new:
          anyOf:
            - type: object
            - type: 'null'
          title: New
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - task_id
        - event_type
        - old
        - new
        - message
        - created_at
      title: TaskEventResponse
    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

````