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

# List all knowledge bases

> Returns a list of your knowledge bases. The knowledge bases are returned sorted by creation date, with the most recent knowledge bases appearing first



## OpenAPI

````yaml get /v2/knowledge
openapi: 3.1.0
info:
  title: orq.ai API
  version: '2.0'
  description: orq.ai API documentation
servers:
  - url: https://api.orq.ai
security:
  - ApiKey: []
tags:
  - name: Guardrail Rules
  - name: Policies
  - name: Routing Rules
  - name: Files
    description: File upload and retrieval operations.
  - name: FilesService
  - name: Projects
    description: Projects organize resources within a workspace
  - name: ProjectsService
  - name: Skills
    description: >-
      Skills are modular instructions you can use to codify processes and
      conventions
  - name: SkillsService
  - name: Responses
  - description: >-
      Run agents on a cadence — cron, interval, or one-off. Minimum firing
      interval is 1 hour.
    name: Agent Schedules
  - name: Reporting
    description: >-
      GenAI reporting API over canonical analytics rollups. Accepts a metric
      name, time range, grain, group-by, and filters; returns a typed time
      series and optional totals.
  - name: ReportingService
    description: |-
      ReportingService exposes a single QueryReport RPC that maps allowlisted
       analytics payloads onto safe rollup queries. Callers never send SQL;
       the backend picks the rollup family and grain from the metric
       catalogue, the requested range, and the requested grouping.
externalDocs:
  url: https://docs.orq.ai
  description: orq.ai Documentation
paths:
  /v2/knowledge:
    get:
      tags:
        - Knowledge Bases
      summary: List all knowledge bases
      description: >-
        Returns a list of your knowledge bases. The knowledge bases are returned
        sorted by creation date, with the most recent knowledge bases appearing
        first
      operationId: ListKnowledgeBases
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 10
            description: >-
              A limit on the number of objects to be returned. Limit can range
              between 1 and 50, and the default is 10
          required: false
          description: >-
            A limit on the number of objects to be returned. Limit can range
            between 1 and 50, and the default is 10
          name: limit
          in: query
        - schema:
            type: string
            description: >-
              A cursor for use in pagination. `starting_after` is an object ID
              that defines your place in the list. For instance, if you make a
              list request and receive 20 objects, ending with
              `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
              `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page
              of the list.
          required: false
          description: >-
            A cursor for use in pagination. `starting_after` is an object ID
            that defines your place in the list. For instance, if you make a
            list request and receive 20 objects, ending with
            `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
            `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page
            of the list.
          name: starting_after
          in: query
        - schema:
            type: string
            description: >-
              A cursor for use in pagination. `ending_before` is an object ID
              that defines your place in the list. For instance, if you make a
              list request and receive 20 objects, starting with
              `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
              `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous
              page of the list.
          required: false
          description: >-
            A cursor for use in pagination. `ending_before` is an object ID that
            defines your place in the list. For instance, if you make a list
            request and receive 20 objects, starting with
            `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
            `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous
            page of the list.
          name: ending_before
          in: query
      responses:
        '200':
          description: Knowledge bases retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            _id:
                              type: string
                              description: The unique identifier of the knowledge base.
                            created:
                              type: string
                              description: The creation date of the knowledge base.
                            description:
                              type: string
                              description: The description of the knowledge base.
                            key:
                              type: string
                              description: The unique key of the knowledge base.
                            domain_id:
                              type: string
                              description: The project/domain ID of the knowledge base.
                            path:
                              type: string
                              description: >-
                                Entity storage path.


                                With workspace-level API keys, use the format
                                `project/folder/subfolder/...`. The first
                                element identifies the project, followed by
                                nested folders (auto-created as needed).
                                Example: `Default/agents`.


                                With project-level API keys, the project is
                                predetermined by the API key, so the path is
                                relative to that project. Example: `agents`. For
                                backward compatibility, a leading project name
                                is ignored when it matches the scoped project.
                              example: Default
                            created_by_id:
                              type:
                                - string
                                - 'null'
                              format: uuid
                            updated_by_id:
                              type:
                                - string
                                - 'null'
                              format: uuid
                            updated:
                              type: string
                              description: The last update date of the knowledge base.
                            type:
                              type: string
                              enum:
                                - internal
                              default: internal
                            retrieval_settings:
                              type: object
                              properties:
                                retrieval_type:
                                  type: string
                                  enum:
                                    - vector_search
                                    - keyword_search
                                    - hybrid_search
                                  default: hybrid_search
                                  description: >-
                                    The retrieval type to use for the knowledge
                                    base. If not provided, Hybrid Search will be
                                    used as a default query strategy.
                                top_k:
                                  type: integer
                                  exclusiveMinimum: 0
                                  default: 5
                                  description: >-
                                    The number of results to return from the
                                    search.
                                threshold:
                                  type: number
                                  minimum: 0
                                  maximum: 1
                                  default: 0
                                  description: >-
                                    The threshold value used to filter the
                                    search results, only documents with a
                                    relevance score greater than the threshold
                                    will be returned
                                rerank_config:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    top_k:
                                      type: integer
                                      minimum: 1
                                      maximum: 100
                                      default: 5
                                      description: >-
                                        The number of results to return by the
                                        reranking model
                                    rerank_threshold:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                      default: 0.5
                                      description: >-
                                        The threshold value used to filter the
                                        rerank results, only documents with a
                                        relevance score greater than the
                                        threshold will be returned
                                    rerank_model:
                                      type: string
                                      description: >-
                                        The rerank model to use for the
                                        knowledge base.
                                  required:
                                    - rerank_model
                                  description: >-
                                    The rerank configuration for the knowledge
                                    base. In case the model is provided it will
                                    be used to enhance the search precision.
                                agentic_rag_config:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    model:
                                      type: string
                                      description: The model to use for the Agentic RAG
                                  required:
                                    - model
                                  description: >-
                                    The Agentic RAG configuration for the
                                    knowledge base. If `null` is provided,
                                    Agentic RAG will be disabled.
                              description: >-
                                The retrieval settings for the knowledge base.
                                If not provider, Hybrid Search will be used as a
                                default query strategy.
                            model:
                              type: string
                              description: >-
                                The embeddings model used for the knowledge
                                base.
                          required:
                            - _id
                            - created
                            - key
                            - domain_id
                            - updated
                            - model
                        - type: object
                          properties:
                            _id:
                              type: string
                              description: The unique identifier of the knowledge base.
                            created:
                              type: string
                              description: The creation date of the knowledge base.
                            description:
                              type: string
                              description: The description of the knowledge base.
                            key:
                              type: string
                              description: The unique key of the knowledge base.
                            domain_id:
                              type: string
                              description: The project/domain ID of the knowledge base.
                            path:
                              type: string
                              description: >-
                                Entity storage path.


                                With workspace-level API keys, use the format
                                `project/folder/subfolder/...`. The first
                                element identifies the project, followed by
                                nested folders (auto-created as needed).
                                Example: `Default/agents`.


                                With project-level API keys, the project is
                                predetermined by the API key, so the path is
                                relative to that project. Example: `agents`. For
                                backward compatibility, a leading project name
                                is ignored when it matches the scoped project.
                              example: Default
                            created_by_id:
                              type:
                                - string
                                - 'null'
                              format: uuid
                            updated_by_id:
                              type:
                                - string
                                - 'null'
                              format: uuid
                            updated:
                              type: string
                              description: The last update date of the knowledge base.
                            type:
                              type: string
                              enum:
                                - external
                              default: external
                            retrieval_settings:
                              type: object
                              properties:
                                top_k:
                                  type: integer
                                  exclusiveMinimum: 0
                                  default: 5
                                  description: >-
                                    The number of results to return from the
                                    search.
                                threshold:
                                  type: number
                                  minimum: 0
                                  maximum: 1
                                  default: 0
                                  description: >-
                                    The threshold value used to filter the
                                    search results, only documents with a
                                    relevance score greater than the threshold
                                    will be returned
                                rerank_config:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    top_k:
                                      type: integer
                                      minimum: 1
                                      maximum: 100
                                      default: 5
                                      description: >-
                                        The number of results to return by the
                                        reranking model
                                    rerank_threshold:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                      default: 0.5
                                      description: >-
                                        The threshold value used to filter the
                                        rerank results, only documents with a
                                        relevance score greater than the
                                        threshold will be returned
                                    rerank_model:
                                      type: string
                                      description: >-
                                        The rerank model to use for the
                                        knowledge base.
                                  required:
                                    - rerank_model
                                  description: >-
                                    The rerank configuration for the knowledge
                                    base. In case the model is provided it will
                                    be used to enhance the search precision.
                                agentic_rag_config:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    model:
                                      type: string
                                      description: The model to use for the Agentic RAG
                                  required:
                                    - model
                                  description: >-
                                    The Agentic RAG configuration for the
                                    knowledge base. If `null` is provided,
                                    Agentic RAG will be disabled.
                              description: The retrieval settings for the knowledge base.
                            external_config:
                              type: object
                              properties:
                                name:
                                  type: string
                                  description: The name of the external knowledge base.
                                api_url:
                                  type: string
                                  format: uri
                                  description: The API URL of the external knowledge base.
                              required:
                                - name
                                - api_url
                          required:
                            - _id
                            - created
                            - key
                            - domain_id
                            - updated
                            - external_config
                  has_more:
                    type: boolean
                required:
                  - object
                  - data
                  - has_more
components:
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````