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

# List Workflow Logs

> Retrieve paginated workflow execution logs with filtering options.



## OpenAPI

````yaml /en/api-reference/openapi_chatflow.json get /workflows/logs
openapi: 3.0.1
info:
  title: Chatflow App API
  description: >-
    Chatflow applications support session persistence, allowing previous chat
    history to be used as context for responses. Chatflow apps use the
    `advanced-chat` mode, providing workflow-level streaming events for detailed
    execution tracking including node starts, finishes, iterations, and workflow
    lifecycle.
  version: 1.0.0
servers:
  - url: '{api_base_url}'
    description: >-
      The base URL for the Chatflow App API. Replace {api_base_url} with the
      actual API base URL provided for your application.
    variables:
      api_base_url:
        default: https://api.dify.ai/v1
        description: Actual base URL of the API
security:
  - ApiKeyAuth: []
tags:
  - name: Chatflows
    description: >-
      Operations for Chatflow apps, including chat messaging, workflow run
      details, and event streaming.
  - name: Files
    description: File upload and preview operations.
  - name: End Users
    description: Operations related to end user information.
  - name: Feedback
    description: User feedback operations.
  - name: Conversations
    description: Operations related to managing conversations.
  - name: TTS
    description: Text-to-Speech and Speech-to-Text operations.
  - name: Applications
    description: Operations to retrieve application settings and information.
  - name: Annotations
    description: Operations related to managing annotations for direct replies.
  - name: Human Input
    description: Endpoints for resuming paused workflows that require human input.
paths:
  /workflows/logs:
    get:
      tags:
        - Chatflows
      summary: List Workflow Logs
      description: Retrieve paginated workflow execution logs with filtering options.
      operationId: listChatflowWorkflowLogs
      parameters:
        - name: keyword
          in: query
          description: Keyword to search in logs.
          schema:
            type: string
        - name: status
          in: query
          description: Filter by execution status.
          schema:
            type: string
            enum:
              - succeeded
              - failed
              - stopped
        - name: page
          in: query
          description: Page number for pagination.
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 99999
        - name: limit
          in: query
          description: Number of items per page.
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: created_at__before
          in: query
          description: Filter logs created before this ISO 8601 timestamp.
          schema:
            type: string
            format: date-time
        - name: created_at__after
          in: query
          description: Filter logs created after this ISO 8601 timestamp.
          schema:
            type: string
            format: date-time
        - name: created_by_end_user_session_id
          in: query
          description: Filter by end user session ID.
          schema:
            type: string
        - name: created_by_account
          in: query
          description: Filter by account ID.
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved workflow logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowLogsResponse'
              examples:
                workflowLogs:
                  summary: Response Example
                  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
                        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_chatflow_123
                        created_at: 1705407629
components:
  schemas:
    WorkflowLogsResponse:
      type: object
      properties:
        page:
          type: integer
          description: Current page number.
        limit:
          type: integer
          description: Number of items per page.
        total:
          type: integer
          description: Total number of log entries.
        has_more:
          type: boolean
          description: Whether more pages are available.
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowLogItem'
          description: List of workflow log entries.
    WorkflowLogItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Log entry ID.
        workflow_run:
          $ref: '#/components/schemas/WorkflowRunSummary'
        created_from:
          type: string
          description: Source of the workflow run (e.g., `service-api`).
        created_by_role:
          type: string
          description: Role of the creator (e.g., `end_user`, `account`).
        created_by_account:
          type: object
          nullable: true
          description: Account details if created by an admin user.
          properties:
            id:
              type: string
              format: uuid
              description: Account ID.
            name:
              type: string
              description: Account display name.
            email:
              type: string
              description: Account email address.
        created_by_end_user:
          $ref: '#/components/schemas/EndUserSummary'
        created_at:
          type: integer
          format: int64
          description: Unix timestamp of when the log entry was created.
        details:
          type: object
          additionalProperties: true
          nullable: true
          description: Additional details for the log entry.
    WorkflowRunSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Workflow run ID.
        version:
          type: string
          description: Workflow version identifier.
        status:
          type: string
          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.
        error:
          type: string
          nullable: true
          description: Error message if the workflow failed.
        elapsed_time:
          type: number
          format: float
          description: Total time elapsed in seconds.
        total_tokens:
          type: integer
          description: Total tokens consumed.
        total_steps:
          type: integer
          description: Total number of workflow steps executed.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp of when the workflow run was created.
        finished_at:
          type: integer
          format: int64
          nullable: true
          description: Unix timestamp of when the workflow run finished.
        exceptions_count:
          type: integer
          description: Number of exceptions that occurred during execution.
        triggered_from:
          type: string
          description: >-
            Source that triggered the workflow run. `debugging` for test runs
            from the editor, `app` for API or app-initiated runs.
    EndUserSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: End user ID.
        type:
          type: string
          description: End user type.
        is_anonymous:
          type: boolean
          description: Whether the end user is anonymous.
        session_id:
          type: string
          description: Session identifier.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        API Key authentication. For all API requests, include your API Key in
        the `Authorization` HTTP Header, prefixed with `Bearer `. Example:
        `Authorization: Bearer {API_KEY}`. **Strongly recommend storing your API
        Key on the server-side, not shared or stored on the client-side, to
        avoid possible API-Key leakage that can lead to serious consequences.**

````