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

> List knowledge bases

# List Knowledge



## OpenAPI

````yaml get /v1/knowledge
openapi: 3.1.0
info:
  title: spectra-server
  description: The API for Spectra Backend.
  version: 0.1.0
servers:
  - url: https://api-spectra.duplik.cn
security: []
paths:
  /v1/knowledge:
    get:
      tags:
        - Knowledge
      summary: List Knowledge
      description: >-
        List knowledge bases under the organization the API key belongs to,
        newest first. Personal knowledge bases are excluded.


        `name` is a fuzzy match. `total_files` is the number of files in the
        knowledge base; pass `process_status` (comma separated, e.g. `200,300`)
        to count only files in those parsing states.
      operationId: list_knowledge_v1_knowledge_get
      parameters:
        - name: page_num
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page Num
            description: Page number
          description: Page number
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 10
            title: Page Size
            description: Page size
          description: Page size
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name
            description: Fuzzy match on knowledge base name
          description: Fuzzy match on knowledge base name
        - name: process_status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Process Status
            description: >-
              Parsing states used when counting total_files, comma separated,
              e.g. 200,300
          description: >-
            Parsing states used when counting total_files, comma separated, e.g.
            200,300
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgePagination'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - HTTPBearer: []
components:
  schemas:
    KnowledgePagination:
      properties:
        total_count:
          type: integer
          title: Total Count
          default: 0
        total_page:
          type: integer
          title: Total Page
          default: 0
        page_num:
          type: integer
          title: Page Num
          default: 1
        page_size:
          type: integer
          title: Page Size
          default: 10
        items:
          items:
            $ref: '#/components/schemas/KnowledgeRead'
          type: array
          title: Items
          default: []
      type: object
      title: KnowledgePagination
    ErrorResponse:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - code
        - message
      title: ErrorResponse
    KnowledgeRead:
      properties:
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
        org_id:
          type: string
          title: Org Id
        user_id:
          type: string
          title: User Id
        name:
          type: string
          maxLength: 128
          title: Name
        description:
          type: string
          maxLength: 512
          title: Description
        icon:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Icon
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        personal:
          anyOf:
            - type: integer
            - type: 'null'
          title: Personal
          description: personal knowledge
          default: false
        knowledge_id:
          type: string
          title: Knowledge Id
        status:
          type: integer
          title: Status
        total_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Files
          default: 0
        dataset_id:
          type: string
          title: Dataset Id
        default_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Folder Id
        owned_delete_permission:
          type: boolean
          title: Owned Delete Permission
          default: false
      type: object
      required:
        - created_at
        - updated_at
        - org_id
        - user_id
        - name
        - description
        - knowledge_id
        - status
        - dataset_id
      title: KnowledgeRead
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````