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

# ワークフローログ一覧を取得

> 過去のワークフロー実行を、任意のフィルターで一覧表示します。各エントリは実行単位のサマリー（ステータス、トークン使用量、ステップ数、所要時間）であり、ノードごとの実行ログではありません。

実行のノードレベルのイベントを追跡するには、代わりにストリーミングを使用します。

- **自分で開始する実行**：[ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) をストリーミングモードで使用すると、実行の進行に応じて `node_started` と `node_finished` が送信されます。
- **すでに進行中の実行**：[ワークフローイベントをストリーム](/api-reference/ワークフロー/ワークフローイベントをストリーム) を `include_state_snapshot=true` 付きで呼び出し、実行済み各ノードのステータスを再送してから、残りをストリーミングします。

完了した実行のノードレベルのログは、サービス API 経由では取得できません。



## OpenAPI

````yaml /ja/api-reference/openapi_workflow.json get /workflows/logs
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/logs:
    get:
      tags:
        - ワークフロー
      summary: ワークフローログ一覧を取得
      description: >-
        過去のワークフロー実行を、任意のフィルターで一覧表示します。各エントリは実行単位のサマリー（ステータス、トークン使用量、ステップ数、所要時間）であり、ノードごとの実行ログではありません。


        実行のノードレベルのイベントを追跡するには、代わりにストリーミングを使用します。


        - **自分で開始する実行**：[ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行)
        をストリーミングモードで使用すると、実行の進行に応じて `node_started` と `node_finished` が送信されます。

        -
        **すでに進行中の実行**：[ワークフローイベントをストリーム](/api-reference/ワークフロー/ワークフローイベントをストリーム)
        を `include_state_snapshot=true`
        付きで呼び出し、実行済み各ノードのステータスを再送してから、残りをストリーミングします。


        完了した実行のノードレベルのログは、サービス API 経由では取得できません。
      operationId: getWorkflowLogsJp
      parameters:
        - name: keyword
          in: query
          description: ログ内を検索するキーワードです。
          schema:
            type: string
        - name: status
          in: query
          description: 実行ステータスでフィルタリングします。
          schema:
            type: string
            enum:
              - succeeded
              - failed
              - stopped
        - name: page
          in: query
          description: ページネーションのページ番号。
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 99999
        - name: limit
          in: query
          description: 1 ページあたりの件数です。
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: created_at__before
          in: query
          description: この ISO 8601 タイムスタンプ以前に作成されたログをフィルタリングします。
          schema:
            type: string
            format: date-time
        - name: created_at__after
          in: query
          description: この ISO 8601 タイムスタンプ以降に作成されたログをフィルタリングします。
          schema:
            type: string
            format: date-time
        - name: created_by_end_user_session_id
          in: query
          description: エンドユーザーセッション ID でフィルタリングします。
          schema:
            type: string
        - name: created_by_account
          in: query
          description: アカウント ID でフィルタリングします。
          schema:
            type: string
      responses:
        '200':
          description: ワークフローログの取得に成功しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowLogsResponse'
              examples:
                workflowLogs:
                  summary: レスポンス例
                  value:
                    page: 1
                    limit: 20
                    total: 1
                    has_more: false
                    data:
                      - id: b7e2f8a1-3c4d-5e6f-7890-abcdef123456
                        workflow_run:
                          id: fb47b2e6-5e43-4f90-be01-d5c5a088d156
                          version: '2025-01-16 12:00:00.000000'
                          status: succeeded
                          error: null
                          elapsed_time: 1.23
                          total_tokens: 150
                          total_steps: 3
                          created_at: 1705407629
                          finished_at: 1705407630
                          exceptions_count: 0
                          triggered_from: app
                        created_from: service-api
                        created_by_role: end_user
                        created_by_account: null
                        created_by_end_user:
                          id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
                          type: service_api
                          is_anonymous: false
                          session_id: user_workflow_123
                        created_at: 1705407629
components:
  schemas:
    WorkflowLogsResponse:
      type: object
      properties:
        page:
          type: integer
          description: 現在のページ番号です。
        limit:
          type: integer
          description: 1 ページあたりの件数です。
        total:
          type: integer
          description: ログエントリの合計数です。
        has_more:
          type: boolean
          description: さらにページがあるかどうかです。
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowLogItem'
          description: ワークフローログエントリのリストです。
    WorkflowLogItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ログエントリ ID です。
        workflow_run:
          $ref: '#/components/schemas/WorkflowRunSummary'
        created_from:
          type: string
          description: ワークフロー実行のソース（例：`service-api`）です。
        created_by_role:
          type: string
          description: 作成者のロール（例：`end_user`、`account`）です。
        created_by_account:
          type: object
          nullable: true
          description: 管理者ユーザーが作成した場合のアカウント詳細です。
          properties:
            id:
              type: string
              format: uuid
              description: アカウント ID。
            name:
              type: string
              description: アカウント表示名。
            email:
              type: string
              description: アカウントメールアドレス。
        created_by_end_user:
          $ref: '#/components/schemas/EndUserSummary'
        created_at:
          type: integer
          format: int64
          description: ログエントリが作成された Unix タイムスタンプです。
        details:
          type: object
          additionalProperties: true
          nullable: true
          description: ログエントリの追加詳細です。
    WorkflowRunSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ワークフロー実行 ID です。
        version:
          type: string
          description: ワークフローバージョン識別子です。
        status:
          type: string
          description: >-
            ワークフローの実行ステータスです。`running` は実行中、`succeeded` は正常完了、`failed`
            は実行エラー、`stopped` は手動停止、`partial-succeeded` は一部のノードが成功し他が失敗、`paused`
            は人間の入力待ちを示します。
        error:
          type: string
          nullable: true
          description: ワークフローが失敗した場合のエラーメッセージです。
        elapsed_time:
          type: number
          format: float
          description: 合計経過時間（秒）です。
        total_tokens:
          type: integer
          description: 消費された合計トークン数です。
        total_steps:
          type: integer
          description: 実行されたワークフローの合計ステップ数です。
        created_at:
          type: integer
          format: int64
          description: ワークフロー実行が作成された Unix タイムスタンプです。
        finished_at:
          type: integer
          format: int64
          nullable: true
          description: ワークフロー実行が完了した Unix タイムスタンプです。
        exceptions_count:
          type: integer
          description: 実行中に発生した例外の数です。
        triggered_from:
          type: string
          description: >-
            ワークフロー実行をトリガーしたソースです。`debugging` はエディタからのテスト実行、`app` は API
            またはアプリからの実行を示します。
    EndUserSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: エンドユーザー ID。
        type:
          type: string
          description: エンドユーザーの種類です。
        is_anonymous:
          type: boolean
          description: エンドユーザーが匿名かどうかです。
        session_id:
          type: string
          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
        の漏洩は深刻な結果につながる可能性があります。**

````