---
title: "Activate a Flow"
method: PUT
path: "/flows/{flow_id}/activate"
tags: ["Flows"]
---

# Activate a Flow

`PUT /flows/{flow_id}/activate`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/flows/{flow_id}/activate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/flows/:flow_id/activate/put.ts> (a function with typed inputs; its response is checked against the schema)

To activate the entire flow, use either the `origin_node_id` from any data source, set or sink in the flow, or include the ?all=1 or ?full_tree=1 query parameter.
  
>**Note**: 
> 1. All endpoints for activating or pausing a flow operate on the specific resource given and all of the flow nodes downstream from that resource. This allows for pausing and activating sub-flows while leaving the rest of the flow state unchanged.
> 
>  2. You can also activate a flow by using the id of the `data_source`/ `data_set` / `data_sink` that the flow node is linked to. See relevant endpoints in the API references for those resources.

## Path parameters

- `flow_id` integer, required
- `all` 1, required

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Response `200`

Success

- object
  - `flows` FlowOriginNode[]
    - `id` integer
    - `parent_node_id` integer: Flow id of the parent flow node if this node is not the root node in the flow chain. This will usually be `null` as most flow definitions will originate in the node for `data_source`.
    - `origin_node_id` integer: Flow id of the root node in the flow chain.
    - `data_source_id` integer: The ID of the data source this flow node is linked to if this is a flow node for a data source.
    - `data_set_id` integer: The ID of the Nexset this flow node is linked to if this is flow node for a Nexset.
    - `data_sink_id` integer: The ID of the data sink this flow node is linked to if this is a flow node for a data sink.
    - `shared_origin_node_id` integer
    - `status` string
    - `project_id` integer
    - `flow_type` string
    - `ingestion_mode` string
    - `name` string
    - `description` string
    - `children` FlowChildNode[]: Each element of this array is a flow node that is directly linked to this flow node.
      - `id` integer
      - `parent_node_id` integer: The flow id of the flow node this node is a direct descendant of.
      - `origin_node_id` integer: The flow id of the flow node at the root of this flow chain.
      - `data_source_id` integer: The ID of the data source this flow node is linked to if this is a flow node for a data source.
      - `data_set_id` integer: The ID of the Nexset this flow node is linked to if this is flow node for a Nexset.
      - `data_sink_id` integer: The ID of the data sink this flow node is linked to if this is a flow node for a data sink.
      - `children` unknown[]: Each element is a flow node that is directly linked to this node.
        - unknown
  - `code_containers` object[]: All code containers that are linked to flow nodes in this response.
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `name` string
    - `description` unknown
    - `data_credentials_id` unknown
    - `public` boolean
    - `managed` boolean
    - `reusable` boolean
    - `resource_type` string
    - `output_type` string
    - `code_type` string
    - `code_encoding` string
    - `access_roles` unknown[]
      - unknown
    - `tags` unknown[]
      - unknown
    - `copied_from_id` integer
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `data_sources` object[]: All data sources that are linked to flow nodes in this response.
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `flow_node_id` integer
    - `origin_node_id` integer
    - `name` string
    - `description` unknown
    - `status` string
    - `data_credentials_id` integer, nullable
    - `data_sink_id` integer, nullable
    - `auto_generated` boolean
    - `managed` boolean
    - `source_type` string
    - `connector_type` string
    - `connection_type` string
    - `template_config` object
    - `vendor` unknown
    - `access_roles` unknown[]
      - unknown
    - `tags` unknown[]
      - unknown
    - `copied_from_id` integer, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `data_sets` object[]: All Nexsets that are linked to flow nodes in this response.
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `flow_node_id` integer
    - `origin_node_id` integer
    - `name` string
    - `description` string
    - `status` string
    - `data_source_id` integer, nullable
    - `parent_data_set_id` integer, nullable
    - `code_container_id` integer, nullable
    - `data_sink_ids` unknown[]
      - unknown
    - `public` boolean
    - `managed` boolean
    - `access_roles` unknown[]
      - unknown
    - `tags` unknown[]
      - unknown
    - `copied_from_id` integer, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `data_sinks` object[]: All data sinks that are linked to flow nodes in this response.
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `flow_node_id` integer
    - `origin_node_id` integer
    - `name` string
    - `description` unknown
    - `status` string
    - `data_credentials_id` integer
    - `data_set_id` integer
    - `data_source_id` integer, nullable
    - `managed` boolean
    - `sink_type` string
    - `connector_type` string
    - `connection_type` string
    - `template_config` object
    - `vendor` unknown
    - `access_roles` unknown[]
      - unknown
    - `tags` unknown[]
      - unknown
    - `copied_from_id` unknown
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `data_credentials` object[]: All credentials that are referenced by flow nodes in this response.
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `name` string
    - `description` unknown
    - `credentials_type` string
    - `verified_status` string
    - `managed` boolean
    - `template_config` object
    - `vendor` unknown
    - `access_roles` unknown[]
      - unknown
    - `tags` unknown[]
      - unknown
    - `copied_from_id` unknown
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `shared_data_sets` unknown[]: Metadata about the parent Nexset any relevant origin flow node is a descendant of. This is only relevant for flow nodes that originate in a shared Nexset instead of a data source.
    - unknown
  - `orgs` Org[]
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` unknown
    - `client_identifier` unknown
  - `users` Owner[]
    - `id` integer
    - `full_name` string
    - `email` string, email
  - `projects` object[]: All projects that any of the flows in this flow response are linked to.
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `name` string
    - `description` string
    - `access_roles` unknown[]
      - unknown

## Other responses

- `403`: Forbidden
- `404`: Not found

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
