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

# List Knowledge Items

> List all knowledge items for the current company with pagination.

Filters:
    - status: filter items by status (indexing, uploaded, error)
    - category: filter items by category (file, txt, url)
    - name: case-insensitive partial match



## OpenAPI

````yaml /api-reference/openapi.json get /v1/knowledge/item/
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/knowledge/item/:
    get:
      tags:
        - Knowledge Items
      summary: List Knowledge Items
      description: |-
        List all knowledge items for the current company with pagination.

        Filters:
            - status: filter items by status (indexing, uploaded, error)
            - category: filter items by category (file, txt, url)
            - name: case-insensitive partial match
      operationId: list_knowledge_items_v1_knowledge_item__get
      parameters:
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: After
        - name: before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Before
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 50
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/KnowledgeItemStatus'
              - type: 'null'
            title: Status
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/KnowledgeItemCategory'
              - type: 'null'
            title: Category
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name
        - name: knowledge_base_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Knowledge Base Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_Annotated_Union_FileKnowledgeItemResponse__URLKnowledgeItemResponse__TextKnowledgeItemResponse___FieldInfo_annotation_NoneType__required_True__discriminator__category____
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    KnowledgeItemStatus:
      type: string
      enum:
        - indexing
        - uploaded
        - error
      title: KnowledgeItemStatus
    KnowledgeItemCategory:
      type: string
      enum:
        - file
        - txt
        - url
      title: KnowledgeItemCategory
    PaginatedResponse_Annotated_Union_FileKnowledgeItemResponse__URLKnowledgeItemResponse__TextKnowledgeItemResponse___FieldInfo_annotation_NoneType__required_True__discriminator__category____:
      properties:
        data:
          items:
            oneOf:
              - $ref: '#/components/schemas/FileKnowledgeItemResponse'
              - $ref: '#/components/schemas/URLKnowledgeItemResponse'
              - $ref: '#/components/schemas/TextKnowledgeItemResponse'
            discriminator:
              propertyName: category
              mapping:
                file:
                  $ref: '#/components/schemas/FileKnowledgeItemResponse'
                txt:
                  $ref: '#/components/schemas/TextKnowledgeItemResponse'
                url:
                  $ref: '#/components/schemas/URLKnowledgeItemResponse'
          type: array
          title: Data
        first_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: First Id
        last_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Id
        has_more:
          type: boolean
          title: Has More
        current_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Page
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
      type: object
      required:
        - data
        - has_more
      title: >-
        PaginatedResponse[Annotated[Union[FileKnowledgeItemResponse,
        URLKnowledgeItemResponse, TextKnowledgeItemResponse],
        FieldInfo(annotation=NoneType, required=True,
        discriminator='category')]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FileKnowledgeItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Knowledge Item ID
          description: Unique identifier for the knowledge item
        name:
          type: string
          title: Knowledge Item Name
          description: Name of the knowledge item
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the item was created
        category:
          type: string
          const: file
          title: Category
          default: file
        status:
          $ref: '#/components/schemas/KnowledgeItemStatus'
          title: Item Status
          description: Current status of the knowledge item
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: Size of the knowledge item content in bytes
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base ID
          description: ID of the knowledge base this item belongs to, if any
        url:
          type: string
          title: Item Url
          description: URL where the file is stored
      type: object
      required:
        - id
        - name
        - created_date
        - status
        - url
      title: FileKnowledgeItemResponse
    URLKnowledgeItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Knowledge Item ID
          description: Unique identifier for the knowledge item
        name:
          type: string
          title: Knowledge Item Name
          description: Name of the knowledge item
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the item was created
        category:
          type: string
          const: url
          title: Category
          default: url
        status:
          $ref: '#/components/schemas/KnowledgeItemStatus'
          title: Item Status
          description: Current status of the knowledge item
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: Size of the knowledge item content in bytes
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base ID
          description: ID of the knowledge base this item belongs to, if any
        url:
          type: string
          title: Item Url
          description: URL of the indexed web page
      type: object
      required:
        - id
        - name
        - created_date
        - status
        - url
      title: URLKnowledgeItemResponse
    TextKnowledgeItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Knowledge Item ID
          description: Unique identifier for the knowledge item
        name:
          type: string
          title: Knowledge Item Name
          description: Name of the knowledge item
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the item was created
        category:
          type: string
          const: txt
          title: Category
          default: txt
        status:
          $ref: '#/components/schemas/KnowledgeItemStatus'
          title: Item Status
          description: Current status of the knowledge item
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: Size of the knowledge item content in bytes
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base ID
          description: ID of the knowledge base this item belongs to, if any
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: Text content of the knowledge item
      type: object
      required:
        - id
        - name
        - created_date
        - status
      title: TextKnowledgeItemResponse
    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
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````