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

# Workflow-Ausführungs-Export-API

> Exportiere Daten zu Workflow-Ausführungen und Node-Ausführungen als JSON für Analysen und Debugging.

Verwende die Workflow-Ausführungs-Export-API, um Daten zu Workflow-Ausführungen und Node-Ausführungen als JSON zu exportieren. Jede Zeile enthält Metadaten zur Ausführung, den Status der Node-Ausführung und detaillierte Ausführungsdaten, wenn du auf die Node zugreifen kannst.

## Bevor du startest

Bevor du startest, stelle sicher, dass du Folgendes hast:

* **Workspace-API-Schlüssel**: Erstelle einen Workspace-API-Schlüssel mit dem `WORKFLOW_API` Scope unter [Einstellungen > Workspace > Produkte > API](/de/admin/workspace/workspace#api). Persönliche API-Schlüssel unterstützen nur die Completion APIs. Mehr dazu findest du unter [Persönliche API-Keys](/de/using-langdock/account/personal-api-keys).
* **Workflow-Zugriff**: Der API-Schlüssel muss zu einem Workflow-Besitzer oder Bearbeiter gehören. Workspace-Administratoren können auch ohne eine Workflow-Freigabe auf Workflows zugreifen. Eine Freigabe mit der Rolle **Benutzer** gewährt keinen Zugriff auf diesen Endpunkt, auch nicht für Workspace-Administratoren.

<Warning>
  Der API-Schlüssel eines Workspace-Administrators kann Daten im gesamten Workspace exportieren. Ein API-Schlüssel eines Nichtadministrators ist auf Workflows begrenzt, die diese Person besitzt oder bearbeiten darf. Gewähre diesen Scope nur vertrauenswürdigen Personen.
</Warning>

## Basis-URL

<Tabs>
  <Tab title="Langdock Cloud">
    ```text theme={null}
    https://api.langdock.com
    ```
  </Tab>

  <Tab title="Dedicated Deployment">
    ```text theme={null}
    https://<deine-domain>/api/public
    ```
  </Tab>
</Tabs>

## Endpunkt

```http theme={null}
GET /workflows/{workflowId}/runs
```

Du erhältst eine Zeile für jede Node-Ausführung. Eine Ausführung ohne Node-Ausführungen gibt eine Zeile mit `null` in den Node-Feldern zurück.

## Authentifizierung

Sende deinen API-Schlüssel als Bearer-Token:

```bash cURL theme={null}
curl "https://api.langdock.com/workflows/550e8400-e29b-41d4-a716-446655440000/runs?from=2026-08-01&to=2026-08-31" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Ersetze bei einem Dedicated Deployment `https://api.langdock.com` durch die Basis-URL deines Deployments.

## Parameter

| Parameter    | Ort   | Typ    | Erforderlich | Beschreibung                                                                                                                                                                                                                    |
| ------------ | ----- | ------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflowId` | Pfad  | string | Ja           | ID des zu exportierenden Workflows. Muss eine gültige GUID sein.                                                                                                                                                                |
| `from`       | Query | string | Ja           | Beginn des Exportzeitraums für den Erstellungszeitpunkt der Ausführung. Verwende ein ISO-8601-Datum oder einen Zeitstempel. Ein Datum ohne Uhrzeit beginnt um `00:00:00.000` UTC.                                               |
| `to`         | Query | string | Ja           | Ende des Exportzeitraums für den Erstellungszeitpunkt der Ausführung. Verwende ein ISO-8601-Datum oder einen Zeitstempel. Ein Datum ohne Uhrzeit endet um `23:59:59.999` UTC. Der Wert muss gleich oder später als `from` sein. |

Füge bei vollständigen Zeitstempeln `Z` oder einen expliziten UTC-Offset hinzu. Ein Zeitstempel ohne Zeitzone wird in der lokalen Zeitzone des Servers interpretiert. Beide Datumswerte sind erforderlich. Die API verwendet keinen Standardzeitraum. Du erhältst alle Node-Ausführungen einer passenden Workflow-Ausführung, auch wenn die Node-Ausführung außerhalb des Zeitraums liegt.

## Antwort

Du erhältst ein `data`-Array mit flachen Zeilen zu Workflow-Ausführungen und Node-Ausführungen:

```json Erfolg theme={null}
{
  "data": [
    {
      "run_id": "7d2a1c4e-2f6a-4b9f-8c31-1a6d8e4f2b90",
      "run_number": 42,
      "run_status": "COMPLETED",
      "run_created_at": "2026-08-12T09:15:00.000Z",
      "run_updated_at": "2026-08-12T09:15:08.000Z",
      "workflow_version": "3",
      "trigger_mode": "WEBHOOK",
      "node_execution_id": "2b8c1d4e-6f7a-4b90-9c12-3d5e7f8a1b20",
      "node_id": "9c1f2d3e-7a4b-4c58-8d19-2e6f0b7a4c31",
      "node_type": "agent",
      "node_status": "COMPLETED",
      "node_created_at": "2026-08-12T09:15:01.000Z",
      "node_updated_at": "2026-08-12T09:15:06.000Z",
      "failure_code": null,
      "input": {
        "customer_id": "customer-42"
      },
      "input_error": null,
      "output": {
        "category": "support"
      },
      "output_error": null,
      "logs": [],
      "data_redacted": false,
      "execution_data_expired_at": null
    }
  ]
}
```

Die Zeilen sind vom ältesten zum neuesten Erstellungszeitpunkt der Workflow-Ausführung und dann nach dem Erstellungszeitpunkt der Node-Ausführung sortiert. Der Endpunkt verwendet keine Pagination. Verwende einen kürzeren Zeitraum, um die Antwort zu verkleinern.

### Antwortfelder

| Feld                        | Typ                 | Beschreibung                                                                                                                                                                             |
| --------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_id`                    | string              | ID der Workflow-Ausführung.                                                                                                                                                              |
| `run_number`                | number              | Fortlaufende Nummer der Ausführung innerhalb des Workflows.                                                                                                                              |
| `run_status`                | string              | Status der Workflow-Ausführung: `PENDING`, `IN_PROGRESS`, `AWAITING_INPUT`, `COMPLETED`, `FAILED` oder `CANCELLED`.                                                                      |
| `run_created_at`            | string              | Erstellungszeit der Workflow-Ausführung im ISO-8601-Format.                                                                                                                              |
| `run_updated_at`            | string              | Zeitpunkt der letzten Aktualisierung der Workflow-Ausführung im ISO-8601-Format.                                                                                                         |
| `workflow_version`          | string              | Für die Ausführung verwendete Workflow-Version. Version `0` ist die Entwurfsversion des Workflows. Der öffentliche Endpunkt bietet keinen Filter für Test- oder Produktionsausführungen. |
| `trigger_mode`              | string oder null    | Modus, der die Ausführung gestartet hat: `WEBHOOK`, `FORM`, `SCHEDULED`, `INTEGRATION_POLLING` oder `MANUAL`.                                                                            |
| `node_execution_id`         | string oder null    | ID der Node-Ausführung.                                                                                                                                                                  |
| `node_id`                   | string oder null    | ID der Workflow-Node.                                                                                                                                                                    |
| `node_type`                 | string oder null    | Typ der Workflow-Node.                                                                                                                                                                   |
| `node_status`               | string oder null    | Status der Node-Ausführung: `NONE`, `IN_PROGRESS`, `AWAITING_INPUT`, `COMPLETED`, `FAILED` oder `CANCELLED`.                                                                             |
| `node_created_at`           | string oder null    | Erstellungszeit der Node-Ausführung im ISO-8601-Format.                                                                                                                                  |
| `node_updated_at`           | string oder null    | Zeitpunkt der letzten Aktualisierung der Node-Ausführung im ISO-8601-Format.                                                                                                             |
| `failure_code`              | string oder null    | Fehlercode, wenn die Node-Ausführung fehlschlägt.                                                                                                                                        |
| `input`                     | JSON-Wert oder null | Eingabedaten der Node-Ausführung.                                                                                                                                                        |
| `input_error`               | JSON-Wert oder null | Fehlerdaten der Node-Eingabe.                                                                                                                                                            |
| `output`                    | JSON-Wert oder null | Ausgabedaten der Node-Ausführung.                                                                                                                                                        |
| `output_error`              | JSON-Wert oder null | Fehlerdaten der Node-Ausgabe.                                                                                                                                                            |
| `logs`                      | JSON-Wert oder null | Während der Node-Ausführung erstellte Logs.                                                                                                                                              |
| `data_redacted`             | boolean             | Gibt an, ob die API Payload-Felder ausgelassen hat, weil du nicht auf die Node-Daten zugreifen kannst oder der Endpunkt den Zugriff darauf nicht feststellen kann.                       |
| `execution_data_expired_at` | string oder null    | Zeitpunkt, zu dem detaillierte Ausführungsdaten abgelaufen sind, im ISO-8601-Format.                                                                                                     |

Die Felder `input` und `output` sind bei Ausführungsdaten, die älter als 30 Tage sind, `null`. Alle fünf Payload-Felder sind `null`, wenn der Endpunkt keinen Zugriff auf die Node-Daten feststellen kann. Das kann passieren, wenn dein Workflow-Zugriff die von der Ausführung verwendete Action oder den Agenten nicht einschließt. Die API setzt `data_redacted` in diesem Fall auf `true`.

Bei Payload-Werten über 16.000 Bytes gibt die API einen Kürzungsmarker zurück. Der Marker enthält ein `_truncated`-Objekt mit den Feldern `originalBytes`, `maxBytes` und `message`.

Die Antwort enthält nicht die Identität der Person oder Gruppe, die eine Ausführung gestartet hat.

## Limits und Aufbewahrung

* Jede Anfrage kann bis zu **10.000 Workflow-Ausführungen** exportieren.
* Eingabe- und Ausgabedaten werden **30 Tage** lang aufbewahrt.
* Die Payload-Daten einer Antwort sind auf **8.000.000 Bytes** begrenzt.

Wenn eine Anfrage mehr als 10.000 Ausführungen enthält, gibt sie `400 Bad Request` mit dem Code `WORKFLOW_RUN_EXPORT_LIMIT_EXCEEDED` zurück. Wenn die Payload-Daten 8.000.000 Bytes überschreiten, gibt sie `400 Bad Request` mit dem Code `WORKFLOW_RUN_EXPORT_TOO_LARGE` zurück. Verwende einen kürzeren Zeitraum, um beide Fehler zu vermeiden.

## Rate Limits

Der Endpunkt erlaubt **500 Anfragen pro Minute** je Workspace und API-Schlüssel. Anfragen über diesem Limit geben `429 Too Many Requests` zurück.

## Fehlerbehandlung

| Statuscode | Beschreibung                                                                                                                                                                                                                                                 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`      | Die Anfrage ist ungültig. Dazu gehören eine ungültige Workflow-ID oder ein ungültiges Datum, ein `to`-Wert vor `from`, ein Export mit mehr als 10.000 Ausführungen oder Payload-Daten über 8.000.000 Bytes.                                                  |
| `401`      | Der API-Schlüssel fehlt oder ist ungültig.                                                                                                                                                                                                                   |
| `403`      | Der API-Schlüssel hat nicht den `WORKFLOW_API` Scope oder sein Besitzer ist nicht der Workflow-Besitzer, Bearbeiter oder Workspace-Administrator. Eine Freigabe mit der Rolle **Benutzer** gewährt keinen Zugriff, auch nicht für Workspace-Administratoren. |
| `405`      | Die Anfrage verwendet eine andere Methode als `GET`.                                                                                                                                                                                                         |
| `429`      | Der Workspace und der API-Schlüssel haben das Anfrage-Limit überschritten.                                                                                                                                                                                   |
| `500`      | Ein unerwarteter Serverfehler ist aufgetreten.                                                                                                                                                                                                               |

```json Fehler theme={null}
{
  "message": "Workflow run exports are limited to 10,000 runs. Select a smaller date range.",
  "code": "WORKFLOW_RUN_EXPORT_LIMIT_EXCEEDED",
  "details": {
    "maxRuns": 10000
  }
}
```

Fehlerhafte Query-Parameter geben `{"message":"Invalid request","errors":[...]}` ohne `code`-Feld zurück. Ein ungültiges Datum oder ein `to`-Wert vor `from` gibt `code: "BAD_REQUEST"` zurück.

<Info>
  Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in den [Best Practices für API-Schlüssel](/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices).
</Info>


## OpenAPI

````yaml GET /workflows/{workflowId}/runs
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /workflows/{workflowId}/runs:
    get:
      tags:
        - Workflow Run Export
      summary: Export workflow run data
      description: |
        Returns flattened workflow run and node execution rows for the selected
        workflow. The date range filters workflow run creation time. The
        endpoint requires a workspace API key with the `WORKFLOW_API` scope and
        owner or editor access. Workspace administrators can access workflows
        without a workflow share, but a User share does not grant access.
      operationId: exportWorkflowRunData
      parameters:
        - name: workflowId
          in: path
          required: true
          description: ID of the workflow to export.
          schema:
            type: string
            format: uuid
        - name: from
          in: query
          required: true
          description: |
            Start of the export range. Use an ISO 8601 date or timestamp. A
            date-only value starts at 00:00:00.000 UTC.
          schema:
            type: string
          example: '2026-08-01'
        - name: to
          in: query
          required: true
          description: |
            End of the export range. Use an ISO 8601 date or timestamp. A
            date-only value ends at 23:59:59.999 UTC.
          schema:
            type: string
          example: '2026-08-31'
      responses:
        '200':
          description: Workflow run export
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunExportResponse'
              example:
                data:
                  - run_id: 7d2a1c4e-2f6a-4b9f-8c31-1a6d8e4f2b90
                    run_number: 42
                    run_status: COMPLETED
                    run_created_at: '2026-08-12T09:15:00.000Z'
                    run_updated_at: '2026-08-12T09:15:08.000Z'
                    workflow_version: '3'
                    trigger_mode: WEBHOOK
                    node_execution_id: 2b8c1d4e-6f7a-4b90-9c12-3d5e7f8a1b20
                    node_id: 9c1f2d3e-7a4b-4c58-8d19-2e6f0b7a4c31
                    node_type: agent
                    node_status: COMPLETED
                    node_created_at: '2026-08-12T09:15:01.000Z'
                    node_updated_at: '2026-08-12T09:15:06.000Z'
                    failure_code: null
                    input:
                      customer_id: customer-42
                    input_error: null
                    output:
                      category: support
                    output_error: null
                    logs: []
                    data_redacted: false
                    execution_data_expired_at: null
        '400':
          description: Invalid request or export exceeds a configured limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunExportError'
              example:
                message: >-
                  Workflow run exports are limited to 10,000 runs. Select a
                  smaller date range.
                code: WORKFLOW_RUN_EXPORT_LIMIT_EXCEEDED
                details:
                  maxRuns: 10000
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunExportError'
        '403':
          description: Missing scope or workflow access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunExportError'
        '405':
          description: Method not allowed
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunExportError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunExportError'
      security:
        - bearerAuth: []
components:
  schemas:
    WorkflowRunExportResponse:
      type: object
      description: Flattened workflow run and node execution rows.
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowRunExportRow'
    WorkflowRunExportError:
      type: object
      description: Error response from the Workflow Run Export API.
      properties:
        message:
          type: string
          description: Error message.
        code:
          type: string
          description: Machine-readable error code, when available.
        details:
          type: object
          additionalProperties: true
          description: Additional error context, when available.
        errors:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Validation details for malformed query parameters.
      required:
        - message
    WorkflowRunExportRow:
      type: object
      description: Data for one workflow run and its node execution.
      required:
        - run_id
        - run_number
        - run_status
        - run_created_at
        - run_updated_at
        - workflow_version
        - trigger_mode
        - node_execution_id
        - node_id
        - node_type
        - node_status
        - node_created_at
        - node_updated_at
        - failure_code
        - input
        - input_error
        - output
        - output_error
        - logs
        - data_redacted
        - execution_data_expired_at
      properties:
        run_id:
          type: string
          format: uuid
          description: ID of the workflow run.
        run_number:
          type: integer
          description: Sequential number of the run within the workflow.
        run_status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - AWAITING_INPUT
            - COMPLETED
            - FAILED
            - CANCELLED
          description: Status of the workflow run.
        run_created_at:
          type: string
          format: date-time
          description: Creation time of the workflow run.
        run_updated_at:
          type: string
          format: date-time
          description: Last update time of the workflow run.
        workflow_version:
          type: string
          description: Version of the workflow used for the run.
        trigger_mode:
          type: string
          nullable: true
          enum:
            - WEBHOOK
            - FORM
            - SCHEDULED
            - INTEGRATION_POLLING
            - MANUAL
          description: Mode that triggered the run.
        node_execution_id:
          type: string
          format: uuid
          nullable: true
          description: ID of the node execution.
        node_id:
          type: string
          format: uuid
          nullable: true
          description: ID of the workflow node.
        node_type:
          type: string
          nullable: true
          description: Type of the workflow node.
        node_status:
          type: string
          nullable: true
          enum:
            - NONE
            - IN_PROGRESS
            - AWAITING_INPUT
            - COMPLETED
            - FAILED
            - CANCELLED
          description: Status of the node execution.
        node_created_at:
          type: string
          format: date-time
          nullable: true
          description: Creation time of the node execution.
        node_updated_at:
          type: string
          format: date-time
          nullable: true
          description: Last update time of the node execution.
        failure_code:
          type: string
          nullable: true
          description: Failure code when the node execution fails.
        input:
          nullable: true
          description: Input data for the node execution.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
            - type: number
            - type: boolean
        input_error:
          nullable: true
          description: Error data for the node input.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
            - type: number
            - type: boolean
        output:
          nullable: true
          description: Output data for the node execution.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
            - type: number
            - type: boolean
        output_error:
          nullable: true
          description: Error data for the node output.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
            - type: number
            - type: boolean
        logs:
          nullable: true
          description: Logs generated during the node execution.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
            - type: number
            - type: boolean
        data_redacted:
          type: boolean
          description: >-
            Whether payload fields were omitted because access to the node data
            could not be established.
        execution_data_expired_at:
          type: string
          format: date-time
          nullable: true
          description: Time when detailed execution data expired.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````