> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-fix-template-upload-size-guidance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Workflow Logs

> **Available for**: Chatflow, Workflow apps.

List past workflow runs with optional filters. Each entry is a run-level summary (status, token usage, step count, and timing), not a node-by-node execution log.

To follow a run's node-level events, stream it instead:

- **A run you start**: use [Run Workflow](/en/api-reference/workflow-runs/run-workflow) in streaming mode, which emits `node_started` and `node_finished` as the run executes.
- **A run already in progress**: call [Stream Workflow Events](/en/api-reference/workflow-runs/stream-workflow-events) with `include_state_snapshot=true` to replay each executed node's status, then stream the rest.

A finished run's node-level logs aren't available through the Service API.



## OpenAPI

````yaml /en/api-reference/openapi_service.json get /workflows/logs
openapi: 3.0.1
info:
  description: >-
    REST API for Dify applications and knowledge bases. Application endpoints
    authenticate with an app API key; knowledge endpoints authenticate with a
    dataset API key.
  title: Dify Service API
  version: 1.0.0
servers:
  - description: >-
      Base URL of the Dify Service API. For self-hosted deployments, replace it
      with your own API base URL.
    url: https://{api_base_url}
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: Host and path of the API base URL, without the `https://` prefix.
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to chat messages and interactions.
    name: Chat Messages
  - description: File upload and preview operations.
    name: Files
  - description: Operations related to end user information.
    name: End Users
  - description: User feedback operations.
    name: Feedback
  - description: Operations related to managing conversations.
    name: Conversations
  - description: Text-to-Speech and Speech-to-Text operations.
    name: Audio
  - description: Operations to retrieve application settings and information.
    name: Applications
  - description: Operations related to managing annotations for direct replies.
    name: Annotations
  - description: Endpoints for resuming paused workflows that require human input.
    name: Human Input
  - description: Operations for executing and managing workflows.
    name: Workflow Runs
  - description: Operations related to text generation and completion.
    name: Completion Messages
  - description: >-
      Operations for managing knowledge bases, including creation,
      configuration, and retrieval.
    name: Knowledge Bases
  - description: >-
      Operations for creating, updating, and managing documents within a
      knowledge base.
    name: Documents
  - description: Operations for managing document chunks and child chunks.
    name: Chunks
  - description: >-
      Operations for managing knowledge base metadata fields and document
      metadata values.
    name: Metadata
  - description: Operations for managing knowledge base tags and tag bindings.
    name: Tags
  - description: Operations for retrieving available models.
    name: Models
  - description: >-
      Operations for managing and running knowledge pipelines, including
      datasource plugins and pipeline execution.
    name: Knowledge Pipeline
paths:
  /workflows/logs:
    get:
      tags:
        - Workflow Runs
      summary: List Workflow Logs
      description: >-
        **Available for**: Chatflow, Workflow apps.


        List past workflow runs with optional filters. Each entry is a run-level
        summary (status, token usage, step count, and timing), not a
        node-by-node execution log.


        To follow a run's node-level events, stream it instead:


        - **A run you start**: use [Run
        Workflow](/en/api-reference/workflow-runs/run-workflow) in streaming
        mode, which emits `node_started` and `node_finished` as the run
        executes.

        - **A run already in progress**: call [Stream Workflow
        Events](/en/api-reference/workflow-runs/stream-workflow-events) with
        `include_state_snapshot=true` to replay each executed node's status,
        then stream the rest.


        A finished run's node-level logs aren't available through the Service
        API.
      operationId: getWorkflowLogs
      parameters:
        - description: Keyword to search in logs.
          in: query
          name: keyword
          schema:
            type: string
        - description: Filter by execution status.
          in: query
          name: status
          schema:
            enum:
              - succeeded
              - failed
              - stopped
            type: string
        - description: Page number.
          in: query
          name: page
          schema:
            default: 1
            maximum: 99999
            minimum: 1
            type: integer
        - description: Number of items per page.
          in: query
          name: limit
          schema:
            default: 20
            maximum: 100
            minimum: 1
            type: integer
        - description: Filter logs created before this ISO 8601 timestamp.
          in: query
          name: created_at__before
          schema:
            format: date-time
            type: string
        - description: Filter logs created after this ISO 8601 timestamp.
          in: query
          name: created_at__after
          schema:
            format: date-time
            type: string
        - description: Filter by end user session ID.
          in: query
          name: created_by_end_user_session_id
          schema:
            type: string
        - description: Filter by the creator's account email (e.g., `name@example.com`).
          in: query
          name: created_by_account
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                workflowLogs:
                  summary: Response Example
                  value:
                    data:
                      - created_at: 1705407629
                        created_by_account: null
                        created_by_end_user:
                          id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
                          is_anonymous: false
                          session_id: user_workflow_123
                          type: service-api
                        created_by_role: end_user
                        created_from: service-api
                        id: b7e2f8a1-3c4d-5e6f-7890-abcdef123456
                        workflow_run:
                          created_at: 1705407629
                          elapsed_time: 1.23
                          error: null
                          exceptions_count: 0
                          finished_at: 1705407630
                          id: fb47b2e6-5e43-4f90-be01-d5c5a088d156
                          status: succeeded
                          total_steps: 3
                          total_tokens: 150
                          triggered_from: app-run
                          version: '2025-01-16 12:00:00.000000'
                    has_more: false
                    limit: 20
                    page: 1
                    total: 1
              schema:
                $ref: '#/components/schemas/WorkflowLogsResponse'
          description: Successfully retrieved workflow logs.
        '400':
          content:
            application/json:
              examples:
                invalid_param:
                  summary: invalid_param
                  value:
                    code: invalid_param
                    message: 'Account not found: name@example.com'
                    status: 400
          description: >-
            `invalid_param` : A query parameter is invalid, such as a
            `created_by_account` value matching no account, a malformed
            `created_at__before` or `created_at__after` timestamp, or an
            out-of-range `page`, `limit`, or `status` value.
components:
  schemas:
    WorkflowLogsResponse:
      properties:
        data:
          description: List of workflow log entries.
          items:
            $ref: '#/components/schemas/WorkflowLogItem'
          type: array
        has_more:
          description: Whether more pages are available.
          type: boolean
        limit:
          description: Number of items per page.
          type: integer
        page:
          description: Current page number.
          type: integer
        total:
          description: Total number of log entries.
          type: integer
      type: object
    WorkflowLogItem:
      properties:
        created_at:
          description: Unix timestamp of when the log entry was created.
          format: int64
          type: integer
        created_by_account:
          description: Account details if created by an admin user.
          nullable: true
          properties:
            email:
              description: Account email address.
              type: string
            id:
              description: Account ID.
              format: uuid
              type: string
            name:
              description: Account display name.
              type: string
          type: object
        created_by_end_user:
          $ref: '#/components/schemas/EndUserSummary'
        created_by_role:
          description: Role of the creator (e.g., `end_user`, `account`).
          type: string
        created_from:
          description: Source of the workflow run (e.g., `service-api`).
          type: string
        details:
          additionalProperties: true
          description: Additional details for the log entry.
          nullable: true
          type: object
        id:
          description: Log entry ID.
          format: uuid
          type: string
        workflow_run:
          $ref: '#/components/schemas/WorkflowRunSummary'
      type: object
    EndUserSummary:
      properties:
        id:
          description: End user ID.
          format: uuid
          type: string
        is_anonymous:
          description: Whether the end user is anonymous.
          type: boolean
        session_id:
          description: Session identifier.
          type: string
        type:
          description: End user type.
          type: string
      type: object
    WorkflowRunSummary:
      properties:
        created_at:
          description: Unix timestamp of when the workflow run was created.
          format: int64
          type: integer
        elapsed_time:
          description: Total time elapsed in seconds.
          format: float
          type: number
        error:
          description: Error message if the workflow failed.
          nullable: true
          type: string
        exceptions_count:
          description: Number of exceptions that occurred during execution.
          type: integer
        finished_at:
          description: Unix timestamp of when the workflow run finished.
          format: int64
          nullable: true
          type: integer
        id:
          description: Workflow run ID.
          format: uuid
          type: string
        status:
          description: >-
            Workflow execution status. `running` for in-progress executions,
            `succeeded` when completed successfully, `failed` when execution
            encountered an error, `stopped` when manually halted,
            `partial-succeeded` when some nodes succeeded but others failed,
            `paused` when awaiting human input.
          type: string
        total_steps:
          description: Total number of workflow steps executed.
          type: integer
        total_tokens:
          description: Total tokens consumed.
          type: integer
        triggered_from:
          description: >-
            Source that triggered the workflow run. `app-run` for runs started
            from the app or API, `webhook` for runs started by a webhook
            trigger, `schedule` for runs started by a schedule trigger, `plugin`
            for runs started by an integration trigger.
          type: string
        version:
          description: Workflow version identifier.
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: API_KEY
      description: >-
        Every request authenticates with an API key: `Authorization: Bearer
        {API_KEY}`. App endpoints take an app API key; knowledge endpoints take
        a knowledge base API key ([Get
        Started](/en/api-reference/guides/get-started)).


        Keep keys server-side; never embed them in client code. Requests with a
        missing or invalid key fail with HTTP `401` (`unauthorized`).
      scheme: bearer
      type: http

````