> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-fix-template-upload-size-guidance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ナレッジベースリストを取得

> ナレッジベースのページネーションリストを返します。任意でキーワードまたはタグでフィルタリングできます。



## OpenAPI

````yaml /ja/api-reference/openapi_service.json get /datasets
openapi: 3.0.1
info:
  description: >-
    Dify アプリケーションとナレッジベースのための REST API です。アプリケーション系エンドポイントはアプリの API
    キーで、ナレッジ系エンドポイントはナレッジベースの API キーで認証します。
  title: Dify サービス API
  version: 1.0.0
servers:
  - description: Dify サービス API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。
    url: https://{api_base_url}
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - description: チャットメッセージとインタラクションに関連する操作です。
    name: チャットメッセージ
  - description: ファイルのアップロードとプレビューの操作です。
    name: ファイル操作
  - description: エンドユーザー情報に関連する操作です。
    name: エンドユーザー
  - description: ユーザーフィードバックの操作です。
    name: メッセージフィードバック
  - description: 会話管理に関連する操作です。
    name: 会話管理
  - description: テキスト読み上げと音声認識の操作です。
    name: 音声・テキスト変換
  - description: アプリケーション設定と情報を取得する操作です。
    name: アプリケーション設定
  - description: ダイレクト返信用のアノテーション管理に関連する操作です。
    name: アノテーション管理
  - description: 人間の入力を要する一時停止中のワークフローの再開操作です。
    name: 人間の入力
  - description: ワークフローの実行と管理のための操作です。
    name: ワークフロー実行
  - description: テキスト生成に関連する操作です。
    name: 完了メッセージ
  - description: ナレッジベースの作成、設定、取得を含むナレッジベース管理の操作です。
    name: ナレッジベース
  - description: ナレッジベース内のドキュメントの作成、更新、管理のための操作です。
    name: ドキュメント
  - description: ドキュメントチャンクと子チャンクの管理のための操作です。
    name: チャンク
  - description: ナレッジベースのメタデータフィールドとドキュメントメタデータ値の管理のための操作です。
    name: メタデータ
  - description: ナレッジベースタグとタグバインディングの管理のための操作です。
    name: タグ管理
  - description: 利用可能なモデルを取得するための操作です。
    name: モデル
  - description: データソースプラグインとパイプライン実行を含むナレッジパイプラインの管理と実行のための操作です。
    name: ナレッジパイプライン
paths:
  /datasets:
    get:
      tags:
        - ナレッジベース
      summary: ナレッジベースリストを取得
      description: ナレッジベースのページネーションリストを返します。任意でキーワードまたはタグでフィルタリングできます。
      operationId: listDatasets
      parameters:
        - description: ページ番号。
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: 1 ページあたりの件数です。
          in: query
          name: limit
          schema:
            default: 20
            type: integer
        - description: 名前でフィルタリングする検索キーワードです。
          in: query
          name: keyword
          schema:
            type: string
        - description: 権限に関係なくすべてのナレッジベースを含めるかどうかです。
          in: query
          name: include_all
          schema:
            default: false
            type: boolean
        - description: >-
            フィルタリングに使用するタグ ID です。タグ ID は
            [ナレッジベースタグリストを取得](/ja/api-reference/tags/list-knowledge-tags)
            から取得します。
          explode: true
          in: query
          name: tag_ids
          schema:
            items:
              type: string
            type: array
          style: form
      responses:
        '200':
          content:
            application/json:
              examples:
                success:
                  summary: レスポンス例
                  value:
                    data:
                      - app_count: 0
                        author_name: admin
                        built_in_field_enabled: true
                        chunk_structure: null
                        created_at: 1741267200
                        created_by: ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4
                        data_source_type: null
                        description: プロダクト API 技術ドキュメント
                        doc_form: text_model
                        doc_metadata: []
                        document_count: 0
                        embedding_available: true
                        embedding_model: text-embedding-3-small
                        embedding_model_provider: langgenius/openai/openai
                        enable_api: true
                        external_knowledge_info: null
                        external_retrieval_model: null
                        icon_info: null
                        id: c42e2a6e-40b3-4330-96f8-f1e4d768e8c9
                        indexing_technique: high_quality
                        is_multimodal: false
                        is_published: false
                        maintainer: admin
                        name: Product Documentation
                        permission: only_me
                        pipeline_id: null
                        provider: vendor
                        retrieval_model_dict:
                          reranking_enable: false
                          reranking_mode: null
                          reranking_model:
                            reranking_model_name: ''
                            reranking_provider_name: ''
                          score_threshold: null
                          score_threshold_enabled: false
                          search_method: semantic_search
                          top_k: 3
                          weights: null
                        runtime_mode: null
                        summary_index_setting: null
                        tags: []
                        total_available_documents: 0
                        total_documents: 0
                        updated_at: 1741267200
                        updated_by: ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4
                        word_count: 0
                    has_more: false
                    limit: 20
                    page: 1
                    total: 1
              schema:
                properties:
                  data:
                    description: ナレッジベースオブジェクトの配列です。
                    items:
                      $ref: '#/components/schemas/Dataset'
                    type: array
                  has_more:
                    description: 次のページにさらに項目が存在するかどうかです。
                    type: boolean
                  limit:
                    description: 1 ページあたりの件数です。
                    type: integer
                  page:
                    description: 現在のページ番号です。
                    type: integer
                  total:
                    description: 一致する項目の合計数です。
                    type: integer
                type: object
          description: ナレッジベースのリストです。
components:
  schemas:
    Dataset:
      properties:
        app_count:
          description: 現在このナレッジベースを使用しているアプリケーションの数です。
          type: integer
        author_name:
          description: 作成者の表示名です。
          type: string
        built_in_field_enabled:
          description: 組み込みメタデータフィールド（例：`document_name`、`uploader`）が有効かどうかです。
          type: boolean
        chunk_structure:
          description: チャンク構造の設定です。
          nullable: true
          type: string
        created_at:
          description: 作成タイムスタンプ（Unix エポック、秒単位）です。
          type: number
        created_by:
          description: ナレッジベースを作成したユーザーの ID です。
          type: string
        data_source_type:
          description: ドキュメントのデータソースタイプです。まだ設定されていない場合は `null` です。
          type: string
        description:
          description: ナレッジベースの目的または内容を説明するオプションのテキストです。
          type: string
        doc_form:
          description: >-
            ドキュメントのチャンキングモードです。`text_model` は標準テキストチャンキング、`hierarchical_model`
            は親子構造、`qa_model` は QA ペア抽出を示します。
          type: string
        doc_metadata:
          description: ナレッジベースのメタデータフィールド定義です。
          items:
            properties:
              id:
                description: メタデータフィールドの識別子です。
                type: string
              name:
                description: メタデータフィールド名です。
                type: string
              type:
                description: メタデータフィールドの値の種類です。
                type: string
            type: object
          type: array
        document_count:
          description: ナレッジベース内のドキュメント総数です。
          type: integer
        embedding_available:
          description: 設定された埋め込みモデルが現在利用可能かどうかです。
          type: boolean
        embedding_model:
          description: インデックス作成に使用される埋め込みモデルの名前です。
          type: string
        embedding_model_provider:
          description: >-
            埋め込みモデルプロバイダーの識別子です。`organization/plugin_name/provider_name`
            の形式です（例：`langgenius/openai/openai`）。以前のナレッジベースでは短縮形（例：`openai`）が返される場合があります。
          type: string
        enable_api:
          description: このナレッジベースで API アクセスが有効かどうかです。
          type: boolean
        external_knowledge_info:
          description: 外部ナレッジベースの接続詳細です。`provider` が `external` の場合に存在します。
          nullable: true
          properties:
            external_knowledge_api_endpoint:
              description: 外部ナレッジ API のエンドポイント URL です。
              type: string
            external_knowledge_api_id:
              description: 外部ナレッジ API 接続の ID です。
              type: string
            external_knowledge_api_name:
              description: 外部ナレッジ API の表示名です。
              type: string
            external_knowledge_id:
              description: 外部ナレッジベースの ID です。
              type: string
          type: object
        external_retrieval_model:
          description: 外部ナレッジベースの検索設定です。内部ナレッジベースの場合は `null` です。
          nullable: true
          properties:
            score_threshold:
              description: 最小関連性スコアのしきい値です。
              type: number
            score_threshold_enabled:
              description: スコア閾値フィルタリングが有効かどうかです。
              type: boolean
            top_k:
              description: 外部ナレッジベースから返す結果の最大数です。
              type: integer
          type: object
        icon_info:
          description: ナレッジベースのアイコン表示設定です。
          nullable: true
          properties:
            icon:
              description: アイコン識別子または絵文字です。
              type: string
            icon_background:
              description: アイコンの背景色です。
              type: string
            icon_type:
              description: アイコンの種類です。
              type: string
            icon_url:
              description: カスタムアイコン画像の URL です。
              type: string
          type: object
        id:
          description: ナレッジベースの一意識別子です。
          type: string
        indexing_technique:
          description: '`high_quality` は埋め込みモデルを使用した精密検索、`economy` はキーワードベースのインデキシングです。'
          type: string
        is_multimodal:
          description: マルチモーダルコンテンツ処理が有効かどうかです。
          type: boolean
        is_published:
          description: ナレッジベースが公開済みかどうかです。
          type: boolean
        maintainer:
          description: ナレッジベースのメンテナーの表示名です。設定されていない場合は `null` です。
          nullable: true
          type: string
        name:
          description: ナレッジベースの表示名です。ワークスペース内で一意です。
          type: string
        partial_member_list:
          description: >-
            `permission` が `partial_members` の場合にアクセスを許可されたメンバーのアカウント ID
            です。更新レスポンスでは常に含まれ、詳細レスポンスでは `permission` が `partial_members`
            の場合にのみ含まれます。
          items:
            type: string
          nullable: true
          type: array
        permission:
          description: >-
            このナレッジベースにアクセスできるユーザーを制御します。指定可能な値：`only_me`、`all_team_members`、`partial_members`。
          type: string
        pipeline_id:
          description: カスタム処理パイプラインが設定されている場合のパイプライン ID です。
          nullable: true
          type: string
        provider:
          description: プロバイダータイプです。内部管理の場合は `vendor`、外部ナレッジベース接続の場合は `external` です。
          type: string
        retrieval_model_dict:
          description: ナレッジベースの検索設定です。
          properties:
            reranking_enable:
              description: リランキングが有効かどうかです。
              type: boolean
            reranking_mode:
              description: >-
                リランキングモードです。`reranking_model` はモデルベースのリランキング、`weighted_score`
                はスコアベースの重み付けを示します。リランキングが無効の場合は `null` です。
              nullable: true
              type: string
            reranking_model:
              description: リランキングモデルの設定です。
              properties:
                reranking_model_name:
                  description: リランキングモデル名です。
                  type: string
                reranking_provider_name:
                  description: >-
                    リランクモデルプロバイダーの識別子です。`organization/plugin_name/provider_name`
                    の形式です（例：`langgenius/cohere/cohere`）。以前のナレッジベースでは短縮形（例：`cohere`）が返される場合があります。
                  type: string
              type: object
            score_threshold:
              description: 結果の最小関連性スコアです。`score_threshold_enabled` が `true` の場合にのみ有効です。
              type: number
            score_threshold_enabled:
              description: スコア閾値フィルタリングが有効かどうかです。
              type: boolean
            search_method:
              description: >-
                検索に使用する検索方法です。`keyword_search` はキーワードマッチング、`semantic_search`
                は埋め込みベースの類似度検索、`full_text_search` は全文インデックス検索、`hybrid_search`
                はセマンティックとキーワードの組み合わせ検索を示します。
              type: string
            top_k:
              description: 返す結果の最大数です。
              type: integer
            weights:
              description: ハイブリッド検索の重み設定です。
              nullable: true
              properties:
                keyword_setting:
                  description: キーワード検索の重み設定です。
                  properties:
                    keyword_weight:
                      description: キーワード検索結果に割り当てられた重みです。
                      type: number
                  type: object
                vector_setting:
                  description: セマンティック検索の重み設定です。
                  properties:
                    embedding_model_name:
                      description: ベクトル検索に使用される埋め込みモデルの名前です。
                      type: string
                    embedding_provider_name:
                      description: ベクトル検索に使用される埋め込みモデルのプロバイダーです。
                      type: string
                    vector_weight:
                      description: セマンティック（ベクトル）検索結果に割り当てられた重みです。
                      type: number
                  type: object
                weight_type:
                  description: セマンティック検索とキーワード検索の重みを調整するための戦略です。
                  type: string
              type: object
          type: object
        runtime_mode:
          description: ランタイム処理モードです。
          nullable: true
          type: string
        summary_index_setting:
          description: サマリーインデックスの設定です。
          nullable: true
          properties:
            enable:
              description: サマリーインデックスが有効かどうかです。
              type: boolean
            model_name:
              description: 要約生成に使用されるモデルの名前です。
              type: string
            model_provider_name:
              description: 要約生成モデルのプロバイダーです。
              type: string
            summary_prompt:
              description: 要約生成に使用されるプロンプトテンプレートです。
              type: string
          type: object
        tags:
          description: このナレッジベースに関連付けられたタグです。
          items:
            properties:
              id:
                description: タグ識別子です。
                type: string
              name:
                description: Tag name.
                type: string
              type:
                description: タグタイプです。ナレッジベースタグの場合は常に `knowledge` です。
                type: string
            type: object
          type: array
        total_available_documents:
          description: 有効で利用可能なドキュメントの数です。
          type: integer
        total_documents:
          description: ドキュメントの合計数です。
          type: integer
        updated_at:
          description: 最終更新タイムスタンプ（Unix エポック、秒単位）です。
          type: number
        updated_by:
          description: ナレッジベースを最後に更新したユーザーの ID です。
          type: string
        word_count:
          description: 全ドキュメントの合計単語数です。
          type: integer
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: API_KEY
      description: >-
        すべてのリクエストは API キーで認証します：`Authorization: Bearer
        {API_KEY}`。アプリのエンドポイントにはアプリの API キーを、ナレッジのエンドポイントにはナレッジベースの API
        キーを使用します（[Dify API クイックスタート](/ja/api-reference/guides/get-started)）。


        キーはサーバーサイドで保管し、クライアントコードには決して埋め込まないでください。キーが欠落または無効なリクエストは HTTP
        `401`（`unauthorized`）で失敗します。
      scheme: bearer
      type: http

````