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

# ワークフロータスクを停止

> 実行中のワークフロータスクを停止します。`streaming` モードでのみサポートされます。



## OpenAPI

````yaml /ja/api-reference/openapi_workflow.json post /workflows/tasks/{task_id}/stop
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:
  /workflows/tasks/{task_id}/stop:
    post:
      tags:
        - ワークフロー
      summary: ワークフロータスクを停止
      description: 実行中のワークフロータスクを停止します。`streaming` モードでのみサポートされます。
      operationId: stopWorkflowTaskGenerationJp
      parameters:
        - name: task_id
          in: path
          required: true
          description: >-
            タスク ID です。[ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) API
            のストリーミングチャンクレスポンスから取得できます。
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user
              properties:
                user:
                  type: string
                  description: >-
                    ユーザー識別子です。[ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行)
                    リクエストで渡したユーザーと一致する必要があります。
            examples:
              example:
                summary: リクエスト例
                value:
                  user: user_workflow_123
      responses:
        '200':
          $ref: '#/components/responses/SuccessResult'
        '400':
          description: |-
            - `not_workflow_app` : アプリモードが API ルートと一致しません。
            - `invalid_param` : 必須パラメータが不足しているか無効です。
          content:
            application/json:
              examples:
                not_workflow_app:
                  summary: not_workflow_app
                  value:
                    status: 400
                    code: not_workflow_app
                    message: Please check if your app mode matches the right API route.
                invalid_param:
                  summary: invalid_param
                  value:
                    status: 400
                    code: invalid_param
                    message: Arg user must be provided.
components:
  responses:
    SuccessResult:
      description: 操作が成功しました。
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: string
                enum:
                  - success
                description: 操作結果です。
          examples:
            success:
              summary: レスポンス例
              value:
                result: success
  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
        の漏洩は深刻な結果につながる可能性があります。**

````