> ## Documentation Index
> Fetch the complete documentation index at: https://adp-doc.laiye.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export workflow runs (Limited preview)

> Export specified workflow runs as Excel, Word, Markdown, or JSON, and return a temporary download URL plus run summaries. The public contract requires at least one explicit `run_id`; it does not expose the backend compatibility behavior that treats an empty list as "export all runs for the application."

The current implementation processes at most 200 runs and generates at most 500,000 rows per request. Temporary files are generally valid for approximately one hour. Limited preview: this route validates only the API Key and tenant; it has no independent administrator-role or application-visibility check. Use it only as an administrator in a controlled tenant, and export only `application_id` and `run_ids` that you have independently confirmed you can access. Exports may contain workflow inputs, node outputs, and business data. Protect the downloaded file at the same classification level as its source data.




## OpenAPI

````yaml en/api-reference/adp-api.yaml POST /open/agentic_engine/laiye/v1/app/runs/export
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, recognition, and
    conversion; extraction application management; webhooks; human
    collaboration; credit usage; workflow discovery, runs, exports, and file
    management.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp-global.laiye.com
    description: ADP global production endpoint
security: []
tags:
  - name: Document extraction
    description: Extract structured fields from uploaded documents.
  - name: Document recognition
    description: Recognize text, layout blocks, and positions from uploaded documents.
  - name: Document conversion
    description: >-
      Convert PDFs, Office documents, OFD files, and images into page images or
      native spreadsheet structures.
  - name: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Webhook
    description: List system events and manage event callbacks.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: >-
      List business workflow templates, run workflow applications, and query run
      results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
  - name: Human collaboration
    description: >-
      Configure review triggers, query collaboration tasks, and submit human
      corrections.
paths:
  /open/agentic_engine/laiye/v1/app/runs/export:
    post:
      tags:
        - Workflow
      summary: Export workflow runs (Limited preview)
      description: >
        Export specified workflow runs as Excel, Word, Markdown, or JSON, and
        return a temporary download URL plus run summaries. The public contract
        requires at least one explicit `run_id`; it does not expose the backend
        compatibility behavior that treats an empty list as "export all runs for
        the application."


        The current implementation processes at most 200 runs and generates at
        most 500,000 rows per request. Temporary files are generally valid for
        approximately one hour. Limited preview: this route validates only the
        API Key and tenant; it has no independent administrator-role or
        application-visibility check. Use it only as an administrator in a
        controlled tenant, and export only `application_id` and `run_ids` that
        you have independently confirmed you can access. Exports may contain
        workflow inputs, node outputs, and business data. Protect the downloaded
        file at the same classification level as its source data.
      operationId: exportWorkflowRuns
      requestBody:
        $ref: '#/components/requestBodies/WorkflowRunExportRequest'
      responses:
        '200':
          $ref: '#/components/responses/WorkflowRunExportResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - EngineApiKeyAuth: []
components:
  requestBodies:
    WorkflowRunExportRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WorkflowRunExportRequest'
          example:
            application_id: app_abc123
            run_ids:
              - run_xyz789
            format: excel
            report_mode: merged
            include_failed_runs: false
            max_text_length: 10000
  responses:
    WorkflowRunExportResponse:
      description: >-
        Workflow-run export result. Treat the download URL as a temporary
        sensitive link.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WorkflowRunExportResponse'
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
          example:
            detail:
              - type: greater_than
                loc:
                  - query
                  - limit
                msg: Input should be greater than 0
                input: 0
                ctx:
                  gt: 0
  schemas:
    WorkflowRunExportRequest:
      type: object
      additionalProperties: false
      properties:
        application_id:
          type: string
          minLength: 1
          description: Workflow application ID.
        run_ids:
          type: array
          minItems: 1
          maxItems: 200
          uniqueItems: true
          description: >-
            Explicitly authorized run IDs to export. The public contract does
            not allow `null` or an empty array to export all runs.
          items:
            type: string
            minLength: 1
        node_ids:
          type: array
          uniqueItems: true
          description: >-
            Optional node IDs. If omitted, all exportable nodes in each run are
            included.
          items:
            type: string
            minLength: 1
        format:
          type: string
          enum:
            - excel
            - word
            - markdown
            - json
          default: excel
        report_mode:
          type: string
          enum:
            - merged
            - per_run
          default: merged
          description: >-
            `merged` produces one combined report; `per_run` separates output by
            run.
        include_failed_runs:
          type: boolean
          default: false
        primary_key_variable:
          type: string
          description: >-
            Optional workflow input-variable name to use as the export primary
            key.
        max_text_length:
          type: integer
          minimum: 1
          maximum: 30000
          default: 10000
          description: >-
            Maximum exported characters for one text value. The route currently
            defaults to 10,000.
      required:
        - application_id
        - run_ids
    WorkflowRunExportResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              oneOf:
                - $ref: '#/components/schemas/WorkflowRunExportData'
                - type: 'null'
    HTTPValidationError:
      type: object
      description: FastAPI/Pydantic request validation error.
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      required:
        - detail
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: Business code. A successful response is usually success or 200.
        message:
          type: string
          description: Response message.
        tips:
          type:
            - string
            - 'null'
          description: Details. Defaults to null.
    WorkflowRunExportData:
      type: object
      properties:
        file_id:
          type: string
        download_url:
          type: string
          format: uri
          description: >-
            Temporary download URL. It is currently generally valid for
            approximately one hour, but this is not a stable SLA.
        filename:
          type: string
        file_size:
          type: integer
          minimum: 0
        format:
          type: string
          enum:
            - excel
            - word
            - markdown
            - json
        report_mode:
          type: string
          enum:
            - merged
            - per_run
        total_runs:
          type: integer
          minimum: 0
          maximum: 200
        included_runs:
          type: integer
          minimum: 0
          maximum: 200
        skipped_runs:
          type: integer
          minimum: 0
          maximum: 200
        run_summaries:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowRunExportSummary'
        export_time:
          type: string
          format: date-time
      required:
        - file_id
        - download_url
        - filename
        - file_size
        - format
        - report_mode
        - total_runs
        - included_runs
        - skipped_runs
        - run_summaries
        - export_time
    ValidationErrorItem:
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          description: Validation error type.
        loc:
          type: array
          description: Location of the invalid field in the request.
          items:
            oneOf:
              - type: string
              - type: integer
        msg:
          type: string
          description: Human-readable validation error message.
        input:
          description: Input value that failed validation.
        ctx:
          type: object
          additionalProperties: true
          description: Additional context supplied by the validator.
        url:
          type: string
          format: uri
          description: Link to the Pydantic error documentation.
      required:
        - type
        - loc
        - msg
    WorkflowRunExportSummary:
      type: object
      properties:
        run_id:
          type: string
        status:
          type: string
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        ended_at:
          type:
            - string
            - 'null'
          format: date-time
        included_nodes:
          type: integer
          minimum: 0
        skipped_nodes:
          type: integer
          minimum: 0
      required:
        - run_id
        - status
        - started_at
        - ended_at
        - included_nodes
        - skipped_nodes
  securitySchemes:
    EngineApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key for workflow endpoints.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.