---
title: "GET /flows/by-source/{sourceId}"
method: GET
path: "/flows/by-source/{sourceId}"
tags: ["flow"]
---

# GET /flows/by-source/{sourceId}

`GET /flows/by-source/{sourceId}`

## Request

- Base URL: `https://headless.dataddo.com/customer-api/v1`
- URL: `https://headless.dataddo.com/customer-api/v1/flows/by-source/{sourceId}`
- Auth: none declared

Get all flows that contain the given source

## Path parameters

- `sourceId` string, required

## Response `200`

Get all flows that contain the given source

- FlowDocument[]
  - `descriptors` Descriptor[]
    - `key` 'EMPTY' | 'DATABASE' | 'TABLE' | 'FILE' | 'FORMAT' | 'PATH' | 'WRITE_MODE' | 'SPREADSHEET_ID' | 'SPREADSHEET' | 'SHEET' | 'DATASET' | 'PROJECT' | 'SCHEMA' | 'TOPIC' | 'ACCOUNT' | 'TYPE' | 'REPORT' | 'GRANULARITY' | 'CHANNEL' | 'PROPERTY' | 'BUCKET'
    - `value` string: descriptor value
  - `external_id` string, nullable: The id of the document in external systems. By setting external_id you can link document with external systems id.
  - `is_locked` boolean: You may mark the document as locked to prevent accidental changes. When locked, the document cannot be modified or deleted.
  - `flow_type` 'fetch' | 'write'
  - `label` string
  - `customer_id` string
  - `sources` FlowSourceDocument[]
    - `source_id` string
  - `rules` FlowDataQualityRuleDocument[]
    - `column_id` string
    - `rule` 'nils' | 'zeros' | 'anomaly'
    - `action` 'block' | 'email'
  - `preceding_actions_policy` 'strict' | 'liberal'
  - `fetch_public_id` string, nullable
  - `created_at` integer
  - `updated_at` integer
  - `write_action` WriteActionDocument
    - `type` string
    - `object_id` string
    - `object_type` string
    - `status` 'live' | 'broken' | 'retrying' | 'running' | 'inactive' | 'cancelling' | 'cancelled'
    - `status_detail` string
    - `last_execution` integer, nullable: Last execution timestamp
    - `next_execution` integer, nullable: Next execution timestamp. Makes sense only for actions with schedule, otherwise it is null. It is computed and updated based on the schedule change or when action is executed.
    - `error_count` integer: Error iteration count
    - `is_being_processed` boolean: Is the action currently being processed?
    - `on_error_retry_timeout` integer: After how many seconds the action should be retried after failure. the value 0 means run retry just after. Example: set to 60*60*2 to retry action not earlier than 2hrs after failure
    - `schedule` object, nullable: Action Schedule settings
    - `created_at` integer
    - `updated_at` integer
    - `duration` string, nullable: Duration
    - `write_mode` 'insert' | 'insert_ignore' | 'truncate_insert' | 'upsert' | 'update' | 'update_ignore' | 'delete' | 'cdc'
    - `unique_columns` string[]: Array of strings.
    - `setup_instructions` string
  - `fdr_allowed` boolean
  - `destination_id` string
  - `stream` boolean
  - `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.
  - `source` FlowSourceDocument[]: Use sources instead.
    - `source_id` string

---

[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)
