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

# Get workflow data by ID



## OpenAPI

````yaml get /v4/workflows/{workflowId}/data
openapi: 3.0.3
info:
  title: Kadoa API
  version: 3.0.0
  contact:
    name: Support
    email: support@kadoa.com
servers:
  - url: https://api.kadoa.com
security: []
paths:
  /v4/workflows/{workflowId}/data:
    get:
      tags:
        - Workflows
      summary: Get workflow data by ID
      parameters:
        - name: x-api-key
          in: header
          required: false
          description: API key for authorization
          schema:
            type: string
        - name: Authorization
          in: header
          required: false
          description: Bearer token for authorization
          schema:
            type: string
        - name: workflowId
          in: path
          required: true
          description: ID of the workflow to retrieve data from
          schema:
            type: string
        - name: runId
          in: query
          required: false
          description: ID of a specific run to retrieve data from
          schema:
            type: string
        - name: format
          in: query
          required: false
          description: Format of the response data
          schema:
            type: string
            enum:
              - json
              - csv
            default: json
        - name: sortBy
          in: query
          required: false
          description: Field to sort the results by
          schema:
            type: string
        - name: order
          in: query
          required: false
          description: Sort order (ascending or descending)
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: filters
          in: query
          required: false
          description: JSON-encoded array of filter objects
          schema:
            type: string
          example: >-
            [{"field":"jobTitle","operator":"CONTAINS","value":"Manager"},{"field":"postedDate","operator":"GREATER_THAN","value":"2023-01-01"}]
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          description: Number of items per page (0 for streaming all data)
          schema:
            type: integer
            minimum: 0
            default: 25
        - name: gzip
          in: query
          required: false
          description: Enable gzip compression for the response
          schema:
            type: boolean
            default: false
        - name: rowIds
          in: query
          required: false
          description: Filter results by specific row IDs (comma-separated or JSON array)
          schema:
            type: string
          example: id1,id2,id3
        - name: includeAnomalies
          in: query
          required: false
          description: Include validation anomalies for each row in the response
          schema:
            type: boolean
            default: false
        - name: download
          in: query
          required: false
          description: >
            "stream" (default) returns the data inline (subject to a 5-minute
            response timeout).

            "link" materializes the full result set as a CSV in object storage
            and returns a JSON

            body with an export id; the caller then streams the file from

            GET /v4/workflows/{workflowId}/data/exports/{exportId}. Use "link"
            for large exports

            that would exceed the streaming timeout. Currently requires
            format=csv.
          schema:
            type: string
            enum:
              - stream
              - link
            default: stream
      responses:
        '200':
          description: >
            Workflow data returned successfully. The application/json body has
            two shapes:

            the default streaming shape (workflowId, data, pagination), and the
            download=link

            shape (export id pointing at a materialized CSV; fetch via the
            exports endpoint).
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: >-
                      Default streaming response (download omitted or
                      download=stream).
                    required:
                      - workflowId
                      - data
                      - pagination
                    properties:
                      workflowId:
                        type: string
                      runId:
                        type: string
                        nullable: true
                      executedAt:
                        type: string
                        format: date-time
                        nullable: true
                      data:
                        type: array
                        items:
                          type: object
                      pagination:
                        type: object
                        properties:
                          totalCount:
                            type: integer
                          page:
                            type: integer
                          totalPages:
                            type: integer
                          limit:
                            type: integer
                  - type: object
                    description: >-
                      Returned when download=link. The CSV is materialized to
                      object storage and fetched via GET
                      /v4/workflows/{workflowId}/data/exports/{exportId}.
                    required:
                      - workflowId
                      - format
                      - totalRows
                      - exportId
                      - downloadPath
                      - expiresAt
                    properties:
                      workflowId:
                        type: string
                      runId:
                        type: string
                        nullable: true
                      executedAt:
                        type: string
                        format: date-time
                        nullable: true
                      format:
                        type: string
                        enum:
                          - csv
                      totalRows:
                        type: integer
                      exportId:
                        type: string
                        format: uuid
                        description: >-
                          Identifier of the materialized CSV. Pass to the
                          exports endpoint to download.
                      downloadPath:
                        type: string
                        description: >-
                          Authenticated download path; combine with the API base
                          URL.
                      expiresAt:
                        type: string
                        format: date-time
            text/csv:
              schema:
                type: string
        '400':
          description: Bad request (invalid parameters)
        '401':
          description: Unauthorized (invalid or missing API key or Bearer token)
        '404':
          description: Workflow or job not found
        '500':
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      x-code-samples:
        - lang: curl
          source: >
            curl -X GET
            "https://api.kadoa.com/v4/workflows/123456789/data?format=json&sortBy=postedDate&order=desc&filters=%5B%7B%22field%22%3A%22jobTitle%22%2C%22operator%22%3A%22CONTAINS%22%2C%22value%22%3A%22Manager%22%7D%2C%7B%22field%22%3A%22postedDate%22%2C%22operator%22%3A%22GREATER_THAN%22%2C%22value%22%3A%222023-01-01%22%7D%5D&page=1&limit=25"
            \

            -H "x-api-key: YOUR_API_KEY"
        - lang: python
          source: |
            import requests
            import json

            url = "https://api.kadoa.com/v4/workflows/123456789/data"
            headers = {
                "x-api-key": "YOUR_API_KEY"
            }
            params = {
                "format": "json",
                "sortBy": "postedDate",
                "order": "desc",
                "filters": json.dumps([
                    {"field": "jobTitle", "operator": "CONTAINS", "value": "Manager"},
                    {"field": "postedDate", "operator": "GREATER_THAN", "value": "2023-01-01"}
                ]),
                "page": 1,
                "limit": 25
            }

            response = requests.get(url, headers=headers, params=params)
            data = response.json()
            print(data)
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token for authentication

````