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

# Entity KPI ranking



## OpenAPI

````yaml /openapi/assignment.yaml get /api/v1/analytics/kpi/entities
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/analytics/kpi/entities:
    get:
      tags:
        - analytics
      summary: Entity KPI ranking
      operationId: get_entity_kpi_ranking_api_v1_analytics_kpi_entities_get
      parameters:
        - name: entity_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Entity Type
        - name: source_service
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Source Service
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            default: cycle_time
            title: Sort By
        - 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/ApiResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApiResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        data:
          title: Data
      type: object
      required:
        - success
        - message
        - data
      title: ApiResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````