---
title: "POST /flows/preview"
method: POST
path: "/flows/preview"
tags: ["flow"]
---

# POST /flows/preview

`POST /flows/preview`

## Request

- Base URL: `https://headless.dataddo.com/customer-api/v1`
- URL: `https://headless.dataddo.com/customer-api/v1/flows/preview`
- Auth: none declared

Get flow data preview from DPI

## Query parameters

- `limit` integer

## Request body

- PostFlowPreviewInput
  - `sources` string[], nullable: List of sources to be used (legacy blending preview).
  - `flow_definition` union: FlowDefinition: exactly one of SqlQueryFlow, UnionFlow, or DirectSourceFlow.
    - SqlQueryFlow
      - `query` string
      - `sources` SqlSourceMappingInput[]
        - `sourceId` string
        - `tableName` string
        - `columns` SqlColumnMappingInput[]
          - `columnId` string
          - `columnName` string
    - UnionFlow
      - `sources` UnionSourceInput[]
        - `sourceId` string
        - `columnOrder` string[]: Optional per-source column order. If empty, inherits the source's natural column order.
    - DirectSourceFlow
      - `sourceId` string
      - `columnOrder` string[]: Optional per-flow column order. If empty, inherits the source's natural column order.
  - `flowId` string, nullable: Optional ID of an existing flow to associate this preview with. The previewed definition always comes from `flow_definition`.

## Response `200`

Get flow data preview from DPI

- PreviewDto
  - `code` string
  - `blob` string
  - `message` string
  - `header` string[]: Array of strings.
  - `log` Log[]
    - `request_url` string
    - `request_method` string
    - `request_header` object: Set of key/value pairs.
    - `request_body` string
    - `response_status_code` integer
    - `response_status` string
    - `response_header` object: Set of key/value pairs.
    - `response_body` string
    - `response_content_length` integer
    - `duration` number, float
    - `cached` boolean
    - `error` string, nullable
  - `key` string[]: Array of strings.
  - `type` string[]
  - `row_count` integer
  - `data` object[]: Row-oriented data: a list of rows, each row a map keyed by column name.

---

[API](https://skmtc.dev/dataddo/apis/dataddo-headless-beta-api.md) · [All operations](https://skmtc.dev/dataddo/apis/dataddo-headless-beta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dataddo/apis/dataddo-headless-beta-api/revisions/dcfa2345bd10?raw)
