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

# List All Knowledge Bases

> Fetches a list of all available knowledge bases with their metadata and associated documents.



## OpenAPI

````yaml GET /ext/kbs
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /ext/kbs:
    get:
      summary: Get all Knowledge Bases
      description: >-
        Fetches a list of all available knowledge bases with their metadata and
        associated documents.
      responses:
        '200':
          description: List of all knowledge bases you have access to.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Unique identifier of the knowledge base in UUID format.
                      format: uuid
                      example: ff152cd9-efb6-4367-a545-b861c9fbd3d0
                    name:
                      type: string
                      description: Human-readable name of the knowledge base.
                      example: Sample Knowledge Base
                    description:
                      type: string
                      description: >-
                        Short description summarizing the purpose or content of
                        the knowledge base.
                      example: HR related policies.
                    no_of_rec:
                      type: integer
                      description: >-
                        Total number of records/documents stored in the
                        knowledge base.
                      example: 20
                    documents:
                      type: array
                      description: >-
                        A list of documents stored inside the knowledge base.
                        Each item represents a single document and contains the
                        fields below.
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Unique identifier for the document in UUID format.
                            format: uuid
                            example: 9a2ad090-aafe-4662-8eb8-a11a404431ea
                          name:
                            type: string
                            description: Original file name of the document.
                            example: hr-policies.pdf
                          type:
                            type: string
                            description: >-
                              File extension indicating the document type
                              (`.pdf`, `.docx` or `.txt`).
                            example: .pdf
                          preview_url:
                            type: string
                            description: >-
                              Publicly accessible URL to preview or download the
                              document.
                            format: uri
                            example: <PUBLIC_URL>
                        required:
                          - id
                          - name
                          - type
                          - preview_url
                    created_at:
                      type: string
                      description: >-
                        Timestamp representing when the knowledge base was
                        initially created (ISO 8601 format).
                      format: date-time
                      example: '2025-10-08T16:34:19.984033Z'
                    updated_at:
                      type: string
                      description: >-
                        Timestamp representing the most recent update to the
                        knowledge base (ISO 8601 format).
                      format: date-time
                      example: '2025-10-08T16:34:19.984033Z'
        '401':
          description: Unauthorized – Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: 'Unauthorized: not a valid authorization api key'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Failed to retrieve knowledge base
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````