> ## Documentation index
> Fetch the complete documentation index at: https://dify-docs.docs7.io/llms.txt
> Ask it with GET https://dify-docs.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# 設定の移行を取得

> [ナレッジベース設定を更新](/ja/api-reference/settings/update-knowledge-base-settings) が `202` を返したときに開始した移行の進捗を返します。`run_state` が `succeeded`、`failed`、`canceled` のいずれかになるまでポーリングしてください。

`succeeded` になったら、[ナレッジベース設定を取得](/ja/api-reference/settings/get-knowledge-base-settings) で新しい設定とその `revision` を読み取ってください。

更新とポーリングの流れについては、[モデルと検索設定の変更](/ja/api-reference/guides/knowledge-base#change-models-or-retrieval-settings) を参照してください。

`GET /knowledge-fs/spaces/{knowledge_base_id}/settings/migrations/{migration_id}`

## OpenAPI

````yaml ja/api-reference/openapi_service.json get /knowledge-fs/spaces/{knowledge_base_id}/settings/migrations/{migration_id}
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: ナレッジパイプライン
  - description: ナレッジベースに質問し、回答をストリーミングで受け取ります。
    name: クエリ
  - description: クエリが何を検索したか、またその理由を確認します。
    name: クエリ記録
  - description: リサーチの質問をバックグラウンドで実行し、その結果を取得します。
    name: リサーチタスク
  - description: ナレッジベースのドキュメントと、そのファイル、リビジョン、チャンクを読み取り、ドキュメントにメタデータのラベルを付けます。
    name: ドキュメントとチャンク
  - description: インデックス処理の追跡、キャンセル、再試行と、ナレッジベースのバックグラウンドタスクの一覧表示を行います。
    name: インデックスタスク
  - description: ドキュメントファイル、ファイルのバッチ、またはソースの削除を、完了するまで追跡します。
    name: 削除ジョブ
  - description: ナレッジベースにデータを供給するソース、その同期スケジュール、接続を管理します。
    name: ソース
  - description: ソースの即時同期、ウェブサイトのページまたはプロバイダーのアイテムのインポート、実行の追跡、キャンセル、再試行を行います。
    name: ソースの同期とインポート
  - description: ナレッジベースのモデルと検索設定の読み取りと変更、および変更によって始まる移行の追跡を行います。
    name: 設定
paths:
  /knowledge-fs/spaces/{knowledge_base_id}/settings/migrations/{migration_id}:
    get:
      description: |-
        [ナレッジベース設定を更新](/ja/api-reference/settings/update-knowledge-base-settings) が `202` を返したときに開始した移行の進捗を返します。`run_state` が `succeeded`、`failed`、`canceled` のいずれかになるまでポーリングしてください。

        `succeeded` になったら、[ナレッジベース設定を取得](/ja/api-reference/settings/get-knowledge-base-settings) で新しい設定とその `revision` を読み取ってください。

        更新とポーリングの流れについては、[モデルと検索設定の変更](/ja/api-reference/guides/knowledge-base#change-models-or-retrieval-settings) を参照してください。
      operationId: getSettingsMigration
      parameters:
        - description: ナレッジベース ID です。ナレッジベースの **API アクセス** ダイアログに表示されるサービス API
            エンドポイントの最後のセグメント（`…/knowledge-fs/spaces/<knowledge base
            ID>`）です。アドレスバーでは `/datasets/new/` の後のセグメントです。
          in: path
          name: knowledge_base_id
          required: true
          schema:
            format: uuid
            type: string
        - description: 移行 ID
            です。[ナレッジベース設定を更新](/ja/api-reference/settings/update-knowledge-base-settings)
            の `202` レスポンスに含まれる `migration.id` です。他の操作では返されません。
          in: path
          name: migration_id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                running:
                  summary: レスポンス例 - 実行中
                  value:
                    candidate_publication_fingerprint: projection-set-sha256:9ce0b7c3b431e0f6550f3f16020732e205ce28e1a5f86426e0cf79e7499563b8
                    changed_kind: embedding
                    checkpoint: candidate-built
                    completed_at: null
                    created_at: 2026-10-20T03:10:00Z
                    error_code: null
                    evaluation_summary: null
                    id: a7c3e9f1-2b4d-4c6e-8f0a-1b3d5f7a9c2e
                    knowledge_space_id: 0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d
                    rebuild_scope: full-vector-space
                    run_state: running
                    updated_at: 2026-10-20T03:14:12Z
                succeeded:
                  summary: レスポンス例 - 成功
                  value:
                    candidate_publication_fingerprint: projection-set-sha256:9ce0b7c3b431e0f6550f3f16020732e205ce28e1a5f86426e0cf79e7499563b8
                    changed_kind: embedding
                    checkpoint: activated
                    completed_at: 2026-10-20T03:18:40Z
                    created_at: 2026-10-20T03:10:00Z
                    error_code: null
                    evaluation_summary:
                      denseProjections: 12
                      documents: 12
                      ftsProjections: 12
                      pageIndexBuilds: 12
                      rebuildScope: full-vector-space
                      vectorSpaceId: embedding-space-sha256:834f47168e39e45d54066b9437e538ba7f12dadfcaea6a93924ce93e99c97a82
                    id: a7c3e9f1-2b4d-4c6e-8f0a-1b3d5f7a9c2e
                    knowledge_space_id: 0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d
                    rebuild_scope: full-vector-space
                    run_state: succeeded
                    updated_at: 2026-10-20T03:18:40Z
              schema:
                $ref: "#/components/schemas/KnowledgeBaseSettingsMigration"
          description: 移行です。
        "400":
          content:
            application/json:
              examples:
                knowledge_fs_invalid_request_path:
                  summary: knowledge_fs_invalid_request (path ID)
                  value:
                    code: knowledge_fs_invalid_request
                    message: Agent Knowledge Base request is invalid.
                    status: 400
                knowledge_fs_invalid_request_upstream:
                  summary: knowledge_fs_invalid_request (rejected)
                  value:
                    code: knowledge_fs_invalid_request
                    failure:
                      category: validation
                      code: KNOWLEDGE_FS_INVALID_REQUEST
                      message: The Agent Knowledge Base request is invalid.
                      retryPolicy: never
                      traceId: 7f3c1a90-2e64-4b7d-8a51-6c0d9e2f4b83
                    message: The Agent Knowledge Base request is invalid.
                    status: 400
          description: |-
            - `knowledge_fs_invalid_request`：`migration_id` が UUID ではありません。
            - `knowledge_fs_invalid_request`：`migration_id` の形式が正しくありません。
        "401":
          content:
            application/json:
              examples:
                knowledge_fs_invalid_credential:
                  summary: knowledge_fs_invalid_credential
                  value:
                    code: knowledge_fs_invalid_credential
                    message: Invalid Agent Knowledge Base service credential.
                    status: 401
                unauthorized:
                  summary: unauthorized
                  value:
                    code: unauthorized
                    message: Access token is invalid
                    status: 401
          description: >-
            - `unauthorized`：`Authorization` ヘッダーがないか、キーが不明であるか、ナレッジベースの API
            キーではありません。

            - `knowledge_fs_invalid_credential`：キーは有効ですが、キーのワークスペースにこの ID
            のナレッジベースが存在しないか、キーがワークスペースに紐付いていません。
        "403":
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden (rate limit)
                  value:
                    code: forbidden
                    message: Sorry, you have reached the knowledge base request rate limit of your
                      subscription.
                    status: 403
                knowledge_fs_access_denied_scope:
                  summary: knowledge_fs_access_denied (key scope)
                  value:
                    code: knowledge_fs_access_denied
                    message: Agent Knowledge Base operation is not allowed.
                    status: 403
          description: |-
            - `knowledge_fs_access_denied`：キーのアクセス範囲がほかのナレッジベースに限定されているか、このナレッジベースで **API アクセス** がオフになっています。または、ナレッジベースがアクティブではありません。
            - `forbidden`：Dify Cloud で、ワークスペースがサブスクリプションで定められたナレッジベースのリクエストレート制限に達しました。読み取りを含め、すべての呼び出しがカウントされます。
        "404":
          content:
            application/json:
              examples:
                knowledge_fs_resource_not_found:
                  summary: knowledge_fs_resource_not_found
                  value:
                    code: knowledge_fs_resource_not_found
                    failure:
                      category: not_found
                      code: KNOWLEDGE_FS_NOT_FOUND
                      message: The requested Agent Knowledge Base resource was not found.
                      retryPolicy: never
                      traceId: 7f3c1a90-2e64-4b7d-8a51-6c0d9e2f4b83
                    message: The requested Agent Knowledge Base resource was not found.
                    status: 404
                not_found:
                  summary: not_found (feature off)
                  value:
                    code: not_found
                    message: The requested URL was not found on the server. If you entered the URL
                      manually please check your spelling and try again.
                    status: 404
          description: |-
            - `knowledge_fs_resource_not_found`：このナレッジベースには、この ID の移行がありません。
            - `not_found`：このデプロイ環境では Agent ナレッジベース機能が無効になっています。
        "502":
          content:
            application/json:
              examples:
                knowledge_fs_upstream_unavailable:
                  summary: knowledge_fs_upstream_unavailable (service error)
                  value:
                    code: knowledge_fs_upstream_unavailable
                    failure:
                      action: contact_admin
                      category: internal
                      code: KNOWLEDGE_FS_INTERNAL_ERROR
                      message: Agent Knowledge Base could not complete the operation. Try again, or
                        contact an administrator with the error reference.
                      retryPolicy: manual
                      traceId: 5e2a9c17-3b4d-4f60-8a1b-2c3d4e5f6a7b
                    message: Agent Knowledge Base could not complete the operation. Try again, or
                      contact an administrator with the error reference.
                    status: 502
                knowledge_fs_upstream_unavailable_transport:
                  summary: knowledge_fs_upstream_unavailable (no response)
                  value:
                    code: knowledge_fs_upstream_unavailable
                    message: Agent Knowledge Base is unavailable.
                    status: 502
          description: "-
            `knowledge_fs_upstream_unavailable`：時間内に応答が返らなかったか、応答を読み取れませんでした。しば\
            らく待ってから再試行してください。"
        "503":
          content:
            application/json:
              examples:
                knowledge_fs_operation_unavailable:
                  summary: knowledge_fs_operation_unavailable
                  value:
                    code: knowledge_fs_operation_unavailable
                    message: Agent Knowledge Base operation is not available.
                    status: 503
                knowledge_fs_operation_unavailable_upstream:
                  summary: knowledge_fs_operation_unavailable (temporary)
                  value:
                    code: knowledge_fs_operation_unavailable
                    failure:
                      action: retry
                      category: dependency
                      code: KNOWLEDGE_FS_UNAVAILABLE
                      message: A service required by Agent Knowledge Base is temporarily unavailable.
                      retryPolicy: manual
                      traceId: 5e2a9c17-3b4d-4f60-8a1b-2c3d4e5f6a7b
                    message: A service required by Agent Knowledge Base is temporarily unavailable.
                    status: 503
          description: |-
            - `knowledge_fs_operation_unavailable`：このワークスペースで Agent ナレッジベース機能が設定されていないか、このデプロイ環境ではこの操作を利用できません。または、リクエストの認可中に、このナレッジベースに対するキーのアクセス権が変更されました。
            - `knowledge_fs_operation_unavailable`：現在このリクエストを処理できません。`failure.retryPolicy` に従ってください。
      summary: 設定の移行を取得
      tags:
        - Settings
      x-mint:
        href: /ja/api-reference/settings/get-settings-migration
        metadata:
          sidebarTitle: 設定の移行を取得
          title: 設定の移行を取得
components:
  schemas:
    KnowledgeBaseSettingsMigration:
      properties:
        candidate_publication_fingerprint:
          description: 内部用です。移行の追跡には不要です。
          nullable: true
          type: string
        changed_kind:
          description: 変更の対象で、`embedding` または `retrieval` です。
          type: string
        checkpoint:
          description: 到達した最後のステップで、`queued`、`candidate-built`、`evaluated`、`activated`
            のいずれかです。移行が終了したかどうかは、`run_state` で判断してください。
          type: string
        completed_at:
          description: 移行が `succeeded`、`failed`、`canceled` のいずれかで終了した日時（ISO 8601）です。実行中は
            `null` です。
          nullable: true
          type: string
        created_at:
          description: 移行の開始日時（ISO 8601）です。
          type: string
        error_code:
          description: 直近の失敗のコードです（例：`PROFILE_MIGRATION_ATTEMPTS_EXHAUSTED`、`VECTOR_SPACE_QUOTA_EXCEEDED`）。失敗がない場合は
            `null` です。
          nullable: true
          type: string
        evaluation_summary:
          description: 移行について記録された結果の、フラットなマップです。移行の追跡には必要ありません。記録されていない場合は `null` です。
          nullable: true
          type: object
        id:
          description: 移行 ID
            です。[設定の移行を取得](/ja/api-reference/settings/get-settings-migration)
            に渡します。
          type: string
        knowledge_space_id:
          description: ナレッジベースの内部 ID です。パスのナレッジベース ID とは異なります。
          type: string
        rebuild_scope:
          description: |-
            移行で再構築される範囲です：

            - `full-vector-space`：埋め込みモデルの変更により、すべてのドキュメントを埋め込み直します。
            - `clone-publication`：どの検索設定の変更でも、現在のインデックスを再利用します。
            - `full-page-index-summary-outline`：非推奨です。以前の移行では、引き続きこの値が返される場合があります。推論モデルを変更した場合は `clone-publication` が返ります。
          type: string
        run_state:
          description: |-
            移行の進行状況です：

            - `queued`、`running`：処理中です。
            - `succeeded`：新しい設定が適用されています。
            - `failed`：停止しました。理由は `error_code` に示されます。変更を再度試す前に、[ナレッジベース設定を取得](/ja/api-reference/settings/get-knowledge-base-settings) でモデルを確認してください。
            - `canceled`：完了前に、同じ種類の新しい変更によってこの移行が置き換えられました。新しい移行を追跡してください。
          type: string
        updated_at:
          description: 移行が最後に変更された日時（ISO 8601）です。
          type: string
      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
````
