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

# List Contents

> List contents with pagination and filtering.

Returns a paginated list of contents from the workspace's knowledge base.

Args:
    collection_id: Filter by specific collection
    status: Filter by processing status
    skip: Number of records to skip (for pagination)
    limit: Maximum number of records to return
    sort_by: Field to sort by (created_at, updated_at, name, size)
    sort_order: Order direction (asc or desc)
    
Returns:
    PaginatedResponse with contents and total count
    
Examples:
    Get first page:
        GET /contents?skip=0&limit=20
    
    Get second page:
        GET /contents?skip=20&limit=20
    
    Filter by collection:
        GET /contents?collection_id=col_123&limit=50
        
    Filter by status:
        GET /contents?status=completed&limit=50
        
    Sort by size:
        GET /contents?sort_by=size&sort_order=desc&limit=20
        
    Combined filters:
        GET /contents?collection_id=col_123&status=completed&skip=0&limit=20



## OpenAPI

````yaml api-reference/openapi.json get /api/v1/contents
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/contents:
    get:
      tags:
        - Contents
      summary: List Contents
      description: >-
        List contents with pagination and filtering.


        Returns a paginated list of contents from the workspace's knowledge
        base.


        Args:
            collection_id: Filter by specific collection
            status: Filter by processing status
            skip: Number of records to skip (for pagination)
            limit: Maximum number of records to return
            sort_by: Field to sort by (created_at, updated_at, name, size)
            sort_order: Order direction (asc or desc)
            
        Returns:
            PaginatedResponse with contents and total count
            
        Examples:
            Get first page:
                GET /contents?skip=0&limit=20
            
            Get second page:
                GET /contents?skip=20&limit=20
            
            Filter by collection:
                GET /contents?collection_id=col_123&limit=50
                
            Filter by status:
                GET /contents?status=completed&limit=50
                
            Sort by size:
                GET /contents?sort_by=size&sort_order=desc&limit=20
                
            Combined filters:
                GET /contents?collection_id=col_123&status=completed&skip=0&limit=20
      operationId: list_contents_api_v1_contents_get
      parameters:
        - name: collection_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by collection ID
            title: Collection Id
          description: Filter by collection ID
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by status (new, processing, completed, failed)
            title: Status
          description: Filter by status (new, processing, completed, failed)
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of contents to skip
            default: 0
            title: Skip
          description: Number of contents to skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Number of contents to return
            default: 100
            title: Limit
          description: Number of contents to return
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            description: Field to sort by
            default: created_at
            title: Sort By
          description: Field to sort by
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            description: Sort order (asc/desc)
            default: desc
            title: Sort Order
          description: Sort order (asc/desc)
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ContentRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    PaginatedResponse_ContentRead_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ContentRead'
          type: array
          title: Data
        total_count:
          type: integer
          title: Total Count
        page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
        next_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Page
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has More
      type: object
      required:
        - data
        - total_count
      title: PaginatedResponse[ContentRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContentRead:
      properties:
        id:
          type: string
          title: Id
          description: Content ID
        name:
          type: string
          title: Name
          description: Content name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Content description
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Content metadata
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Content type/MIME type
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
          description: Content size in bytes
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Content processing status
        sync_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Sync Status
          description: Sync status
        status_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Message
          description: Status message
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
          description: Content hash
        file_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: File Data
          description: File data information
        definition:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition
          description: Content definition
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
          description: Creation timestamp
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
          description: Update timestamp
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External system ID
        collection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Collection Id
          description: Collection ID
        workspace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workspace Id
          description: Workspace ID
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Content configuration
        linked_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Linked To
          description: Linked content ID
        access_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Access Count
          description: Number of times accessed
      type: object
      required:
        - id
        - name
      title: ContentRead
      description: Schema for reading content.
    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:
    DualAuthScheme:
      type: http
      scheme: bearer

````