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

# ナレッジベース詳細を取得

> 特定のナレッジベースの詳細情報（埋め込みモデル、検索設定、ドキュメント統計を含む）を取得します。



## OpenAPI

````yaml /ja/api-reference/openapi_knowledge.json get /datasets/{dataset_id}
openapi: 3.0.1
info:
  title: ナレッジAPI
  description: >-
    ナレッジベース、ドキュメント、チャンク、メタデータ、タグの管理（作成、取得、設定を含む）のための API です。**注意：**単一のナレッジベース
    API キーは、同じアカウント配下のすべての可視ナレッジベースを操作する権限を持ちます。データセキュリティにご注意ください。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: Knowledge API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - name: データセット
    description: ナレッジベースの作成、設定、取得を含むナレッジベース管理の操作です。
  - name: ドキュメント
    description: ナレッジベース内のドキュメントの作成、更新、管理のための操作です。
  - name: チャンク
    description: ドキュメントチャンクと子チャンクの管理のための操作です。
  - name: メタデータ
    description: ナレッジベースのメタデータフィールドとドキュメントメタデータ値の管理のための操作です。
  - name: タグ管理
    description: ナレッジベースタグとタグバインディングの管理のための操作です。
  - name: モデル
    description: 利用可能なモデルを取得するための操作です。
  - name: ナレッジパイプライン
    description: データソースプラグインとパイプライン実行を含むナレッジパイプラインの管理と実行のための操作です。
paths:
  /datasets/{dataset_id}:
    get:
      tags:
        - データセット
      summary: ナレッジベース詳細を取得
      description: 特定のナレッジベースの詳細情報（埋め込みモデル、検索設定、ドキュメント統計を含む）を取得します。
      operationId: getDatasetDetail
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ナレッジベース ID です。
      responses:
        '200':
          description: ナレッジベースの詳細です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
              examples:
                success:
                  summary: レスポンス例
                  value:
                    id: c42e2a6e-40b3-4330-96f8-f1e4d768e8c9
                    name: Product Documentation
                    description: プロダクト API 技術ドキュメント
                    provider: vendor
                    permission: only_me
                    data_source_type: null
                    indexing_technique: high_quality
                    app_count: 0
                    document_count: 0
                    word_count: 0
                    created_by: ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4
                    author_name: admin
                    created_at: 1741267200
                    updated_by: ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4
                    updated_at: 1741267200
                    embedding_model: text-embedding-3-small
                    embedding_model_provider: openai
                    embedding_available: true
                    retrieval_model_dict:
                      search_method: semantic_search
                      reranking_enable: false
                      reranking_mode: null
                      reranking_model:
                        reranking_provider_name: ''
                        reranking_model_name: ''
                      weights: null
                      top_k: 3
                      score_threshold_enabled: false
                      score_threshold: null
                    tags: []
                    doc_form: text_model
                    external_knowledge_info: null
                    external_retrieval_model: null
                    doc_metadata: []
                    built_in_field_enabled: true
                    pipeline_id: null
                    runtime_mode: null
                    chunk_structure: null
                    icon_info: null
                    summary_index_setting: null
                    is_published: false
                    total_documents: 0
                    total_available_documents: 0
                    enable_api: true
                    is_multimodal: false
        '403':
          description: '`forbidden` : このナレッジベースにアクセスする権限がありません。'
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    status: 403
                    code: forbidden
                    message: Insufficient permissions to access this knowledge base.
        '404':
          description: '`not_found` : ナレッジベースが見つかりません。'
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    status: 404
                    code: not_found
                    message: Dataset not found.
components:
  schemas:
    Dataset:
      type: object
      properties:
        id:
          type: string
          description: ナレッジベースの一意識別子です。
        name:
          type: string
          description: ナレッジベースの表示名です。ワークスペース内で一意です。
        description:
          type: string
          description: ナレッジベースの目的または内容を説明するオプションのテキストです。
        provider:
          type: string
          description: プロバイダータイプです。内部管理の場合は `vendor`、外部ナレッジベース接続の場合は `external` です。
        permission:
          type: string
          description: >-
            このナレッジベースにアクセスできるユーザーを制御します。指定可能な値：`only_me`、`all_team_members`、`partial_members`。
        data_source_type:
          type: string
          description: ドキュメントのデータソースタイプです。まだ設定されていない場合は `null` です。
        indexing_technique:
          type: string
          description: '`high_quality` は埋め込みモデルを使用した精密検索、`economy` はキーワードベースのインデキシングです。'
        app_count:
          type: integer
          description: 現在このナレッジベースを使用しているアプリケーションの数です。
        document_count:
          type: integer
          description: ナレッジベース内のドキュメント総数です。
        word_count:
          type: integer
          description: 全ドキュメントの合計単語数です。
        created_by:
          type: string
          description: ナレッジベースを作成したユーザーの ID です。
        author_name:
          type: string
          description: 作成者の表示名です。
        created_at:
          type: number
          description: 作成タイムスタンプ（Unix エポック、秒単位）です。
        updated_by:
          type: string
          description: ナレッジベースを最後に更新したユーザーの ID です。
        updated_at:
          type: number
          description: 最終更新タイムスタンプ（Unix エポック、秒単位）です。
        embedding_model:
          type: string
          description: インデックス作成に使用される埋め込みモデルの名前です。
        embedding_model_provider:
          type: string
          description: >-
            埋め込みモデルプロバイダーです。[利用可能なモデルを取得](/api-reference/モデル/利用可能なモデルを取得) で
            `model_type=text-embedding` を指定した際の `provider` フィールドの値を使用します。
        embedding_available:
          type: boolean
          description: 設定された埋め込みモデルが現在利用可能かどうかです。
        retrieval_model_dict:
          type: object
          description: ナレッジベースの検索設定です。
          properties:
            search_method:
              type: string
              description: >-
                検索に使用する検索方法です。`keyword_search` はキーワードマッチング、`semantic_search`
                は埋め込みベースの類似度検索、`full_text_search` は全文インデックス検索、`hybrid_search`
                はセマンティックとキーワードの組み合わせ検索を示します。
            reranking_enable:
              type: boolean
              description: リランキングが有効かどうかです。
            reranking_mode:
              type: string
              nullable: true
              description: >-
                リランキングモードです。`reranking_model` はモデルベースのリランキング、`weighted_score`
                はスコアベースの重み付けを示します。リランキングが無効の場合は `null` です。
            reranking_model:
              type: object
              description: リランキングモデルの設定です。
              properties:
                reranking_provider_name:
                  type: string
                  description: リランキングモデルのプロバイダー名です。
                reranking_model_name:
                  type: string
                  description: リランキングモデル名です。
            weights:
              type: object
              nullable: true
              description: ハイブリッド検索の重み設定です。
              properties:
                weight_type:
                  type: string
                  description: セマンティック検索とキーワード検索の重みを調整するための戦略です。
                vector_setting:
                  type: object
                  description: セマンティック検索の重み設定です。
                  properties:
                    vector_weight:
                      type: number
                      description: セマンティック（ベクトル）検索結果に割り当てられた重みです。
                    embedding_provider_name:
                      type: string
                      description: ベクトル検索に使用される埋め込みモデルのプロバイダーです。
                    embedding_model_name:
                      type: string
                      description: ベクトル検索に使用される埋め込みモデルの名前です。
                keyword_setting:
                  type: object
                  description: キーワード検索の重み設定です。
                  properties:
                    keyword_weight:
                      type: number
                      description: キーワード検索結果に割り当てられた重みです。
            top_k:
              type: integer
              description: 返す結果の最大数です。
            score_threshold_enabled:
              type: boolean
              description: スコア閾値フィルタリングが有効かどうかです。
            score_threshold:
              type: number
              description: 結果の最小関連性スコアです。`score_threshold_enabled` が `true` の場合にのみ有効です。
        summary_index_setting:
          type: object
          nullable: true
          description: サマリーインデックスの設定です。
          properties:
            enable:
              type: boolean
              description: サマリーインデックスが有効かどうかです。
            model_name:
              type: string
              description: 要約生成に使用されるモデルの名前です。
            model_provider_name:
              type: string
              description: 要約生成モデルのプロバイダーです。
            summary_prompt:
              type: string
              description: 要約生成に使用されるプロンプトテンプレートです。
        tags:
          type: array
          description: このナレッジベースに関連付けられたタグです。
          items:
            type: object
            properties:
              id:
                type: string
                description: タグ識別子です。
              name:
                type: string
                description: Tag name.
              type:
                type: string
                description: タグタイプです。ナレッジベースタグの場合は常に `knowledge` です。
        doc_form:
          type: string
          description: >-
            ドキュメントのチャンキングモードです。`text_model` は標準テキストチャンキング、`hierarchical_model`
            は親子構造、`qa_model` は QA ペア抽出を示します。
        external_knowledge_info:
          type: object
          nullable: true
          description: 外部ナレッジベースの接続詳細です。`provider` が `external` の場合に存在します。
          properties:
            external_knowledge_id:
              type: string
              description: 外部ナレッジベースの ID です。
            external_knowledge_api_id:
              type: string
              description: 外部ナレッジ API 接続の ID です。
            external_knowledge_api_name:
              type: string
              description: 外部ナレッジ API の表示名です。
            external_knowledge_api_endpoint:
              type: string
              description: 外部ナレッジ API のエンドポイント URL です。
        external_retrieval_model:
          type: object
          nullable: true
          description: 外部ナレッジベースの検索設定です。内部ナレッジベースの場合は `null` です。
          properties:
            top_k:
              type: integer
              description: 外部ナレッジベースから返す結果の最大数です。
            score_threshold:
              type: number
              description: 最小関連性スコアのしきい値です。
            score_threshold_enabled:
              type: boolean
              description: スコア閾値フィルタリングが有効かどうかです。
        doc_metadata:
          type: array
          description: ナレッジベースのメタデータフィールド定義です。
          items:
            type: object
            properties:
              id:
                type: string
                description: メタデータフィールドの識別子です。
              name:
                type: string
                description: メタデータフィールド名です。
              type:
                type: string
                description: メタデータフィールドの値の種類です。
        built_in_field_enabled:
          type: boolean
          description: 組み込みメタデータフィールド（例：`document_name`、`uploader`）が有効かどうかです。
        pipeline_id:
          type: string
          nullable: true
          description: カスタム処理パイプラインが設定されている場合のパイプライン ID です。
        runtime_mode:
          type: string
          nullable: true
          description: ランタイム処理モードです。
        chunk_structure:
          type: string
          nullable: true
          description: チャンク構造の設定です。
        icon_info:
          type: object
          nullable: true
          description: ナレッジベースのアイコン表示設定です。
          properties:
            icon_type:
              type: string
              description: アイコンの種類です。
            icon:
              type: string
              description: アイコン識別子または絵文字です。
            icon_background:
              type: string
              description: アイコンの背景色です。
            icon_url:
              type: string
              description: カスタムアイコン画像の URL です。
        is_published:
          type: boolean
          description: ナレッジベースが公開済みかどうかです。
        total_documents:
          type: integer
          description: ドキュメントの合計数です。
        total_available_documents:
          type: integer
          description: 有効で利用可能なドキュメントの数です。
        enable_api:
          type: boolean
          description: このナレッジベースで API アクセスが有効かどうかです。
        is_multimodal:
          type: boolean
          description: マルチモーダルコンテンツ処理が有効かどうかです。
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        API Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer `
        プレフィックスを付けた API Key を含めてください。例：`Authorization: Bearer {API_KEY}`。**API
        Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key
        の漏洩は深刻な結果につながる可能性があります。**

````