> ## 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.

# 人間の入力フォームを取得

> 一時停止中の人間の入力フォームの内容を取得します。 WebApp 配信が必要です。

人間の入力エンドポイントを呼び出す一連の流れについては、[API 連携フロー](/ja/self-host/use-dify/nodes/hitl-api-integration-flow) を参照してください。



## OpenAPI

````yaml /ja/api-reference/openapi_workflow.json get /form/human_input/{form_token}
openapi: 3.0.1
info:
  title: ワークフローアプリAPI
  description: ワークフローアプリケーションはセッションなしの動作をサポートし、翻訳、記事作成、要約 AI などに最適です。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: Workflow App 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: 人間の入力を要する一時停止中のワークフローの再開操作です。
paths:
  /form/human_input/{form_token}:
    get:
      tags:
        - 人間の入力
      summary: 人間の入力フォームを取得
      description: >-
        一時停止中の人間の入力フォームの内容を取得します。 WebApp 配信が必要です。


        人間の入力エンドポイントを呼び出す一連の流れについては、[API
        連携フロー](/ja/self-host/use-dify/nodes/hitl-api-integration-flow)
        を参照してください。
      operationId: getWorkflowHumanInputForm
      parameters:
        - name: form_token
          in: path
          required: true
          schema:
            type: string
          description: >-
            一時停止中のフォームへのアクセストークン。ストリーミングモードのワークフローを実行エンドポイントまたはチャットメッセージを送信エンドポイントが返す
            `human_input_required` イベントから取得します。
      responses:
        '200':
          description: フォーム内容の取得に成功しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  form_content:
                    type: string
                    description: ワークフロー変数を埋め込んだ、事前レンダリング済みのフォーム本文。
                  inputs:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: >-
                            フォーム入力コントロールの種類。利用可能な値： `paragraph` （複数行テキスト入力）、
                            `select` （リストからの単一選択）、 `file` （単一ファイルアップロード）、
                            `file-list` （複数ファイルアップロード）。
                        output_variable_name:
                          type: string
                          description: >-
                            ワークフロー内でこの入力の送信値を参照する際の変数名。送信リクエストの `inputs`
                            オブジェクトのキーに対応します。
                        default:
                          type: object
                          nullable: true
                          description: >-
                            `paragraph`
                            入力の生のデフォルト値設定。クライアントはこのフィールドを直接解決すべきではありません。デフォルトの表示には
                            `resolved_default_values`
                            を使用してください。その他の入力タイプ、またはデフォルト値が未設定の場合は `null` になります。
                          properties:
                            type:
                              type: string
                              description: >-
                                デフォルト値のソース。 `constant` は `value`
                                をリテラル文字列として使用することを示します。 `variable` は `selector`
                                がワークフロー変数を指すことを示します。
                            selector:
                              type: array
                              items:
                                type: string
                              description: >-
                                `type` が `variable` の場合の変数参照パス（例： `["node_id",
                                "var_name"]`）。少なくとも 2 つの要素を含む必要があります。
                            value:
                              type: string
                              description: '`type` が `constant` の場合のリテラルなデフォルト値。常に文字列です。'
                        option_source:
                          type: object
                          description: '`select` 入力の選択肢のソース。 `type` が `select` の場合のみ含まれます。'
                          properties:
                            type:
                              type: string
                              enum:
                                - variable
                                - constant
                              description: >-
                                選択肢のソース。 `constant` は `value`
                                に選択肢を直接列挙することを示します。 `variable` は `selector`
                                が選択肢を提供する `array[string]` 型のワークフロー変数を指すことを示します。
                            selector:
                              type: array
                              items:
                                type: string
                              description: '`type` が `variable` の場合の変数参照パス。'
                            value:
                              type: array
                              items:
                                type: string
                              description: '`type` が `constant` の場合のリテラルな選択肢リスト。'
                        allowed_file_types:
                          type: array
                          items:
                            type: string
                            enum:
                              - image
                              - document
                              - audio
                              - video
                              - custom
                          description: >-
                            受信者がアップロード可能なファイルカテゴリ。 `file` および `file-list`
                            入力に含まれます。値： `image`、 `document`、 `audio`、 `video`、
                            `custom`。
                        allowed_file_extensions:
                          type: array
                          items:
                            type: string
                          description: >-
                            `allowed_file_types` に `custom`
                            が含まれる場合に許可されるファイル拡張子。各拡張子には先頭の `.` を含めてください。たとえば
                            `.md` です。`file` および `file-list` 入力に含まれます。
                        allowed_file_upload_methods:
                          type: array
                          items:
                            type: string
                            enum:
                              - local_file
                              - remote_url
                          description: >-
                            受信者が使用できるアップロード方法。値： `local_file`、 `remote_url`。
                            `file` および `file-list` 入力に含まれます。
                        number_limits:
                          type: integer
                          description: 受信者がアップロードできるファイルの最大数。 `file-list` 入力のみに含まれます。
                    description: フォーム入力フィールドの定義。
                  resolved_default_values:
                    type: object
                    additionalProperties:
                      type: string
                    description: >-
                      フォームに表示するための事前計算済みデフォルト値。入力の `output_variable_name`
                      をキーとします。デフォルト値がワークフロー変数から解決可能な `paragraph`
                      入力にのみ設定されます。解決可能なデフォルトがない入力では空になります。クライアントはこれらの値をそのまま表示してください。
                      `default` をクライアント側で再解決する必要はありません。すべての値は文字列化されています。
                  user_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          maxLength: 20
                          pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                          description: >-
                            アクションボタンの識別子。受信者がこのボタンを選択したときに、[人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信)
                            エンドポイントの `action` として渡します。
                        title:
                          type: string
                          maxLength: 100
                          description: 受信者に表示されるボタンのラベル。
                        button_style:
                          type: string
                          description: >-
                            ボタンの視覚スタイル。利用可能な値： `primary`、 `default`、 `accent`、
                            `ghost`。
                    description: 利用可能な送信アクション。
                  expiration_time:
                    type: integer
                    format: int64
                    description: Unix タイムスタンプ（秒）。この時刻以降、フォームは送信できなくなります。
                    nullable: true
              examples:
                success:
                  summary: レスポンス例
                  value:
                    form_content: >-
                      Please review the draft, set a priority, and confirm or
                      request changes.
                    inputs:
                      - type: paragraph
                        output_variable_name: feedback
                        default:
                          type: constant
                          selector: []
                          value: ''
                      - type: select
                        output_variable_name: priority
                        option_source:
                          type: constant
                          selector: []
                          value:
                            - low
                            - medium
                            - high
                      - type: file
                        output_variable_name: attachment
                        allowed_file_types:
                          - image
                          - document
                        allowed_file_extensions: []
                        allowed_file_upload_methods:
                          - local_file
                          - remote_url
                      - type: file-list
                        output_variable_name: attachments
                        allowed_file_types:
                          - image
                          - document
                        allowed_file_extensions: []
                        allowed_file_upload_methods:
                          - local_file
                          - remote_url
                        number_limits: 5
                    resolved_default_values:
                      feedback: ''
                    user_actions:
                      - id: approve
                        title: Approve
                        button_style: primary
                      - id: reject
                        title: Request changes
                        button_style: default
                    expiration_time: 1745510400
        '404':
          description: '`not_found` ：フォームが見つかりません。'
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    status: 404
                    code: not_found
                    message: フォームが見つかりません
        '412':
          description: >-
            - `human_input_form_submitted`
            ：フォームは送信済みです。フォームはワンショットで、最初の応答が有効になります（送信したユーザーは問いません）。

            - `human_input_form_expired` ：送信が到達する前にフォームの有効期限が切れています。
          content:
            application/json:
              examples:
                human_input_form_submitted:
                  summary: human_input_form_submitted
                  value:
                    status: 412
                    code: human_input_form_submitted
                    message: >-
                      このフォームは他のユーザーによって送信済みです。form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890
                human_input_form_expired:
                  summary: human_input_form_expired
                  value:
                    status: 412
                    code: human_input_form_expired
                    message: >-
                      このフォームは有効期限切れです。form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890
components:
  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
        の漏洩は深刻な結果につながる可能性があります。**

````