Skip to main content

Update a Data Flow

Most updates to data flow configurations must be done directly with PUT requests on the component resources, such as data_sources, data_sets, and data_sinks. However, the flows API supports several composite operations that can update multiple components of a flow simultaneously.

Composite Flow Operations

The data flows API supports the following composite operations, which cascade across all components of the flow when applicable:

Activate Flow

Activate all components of a flow based on a specific downstream resource or the entire flow.

Activate Flow: Request
PUT /flows/{flow-node-id}/activate
PUT /data_sources/{data-source-id}/flow/activate
PUT /data_sets/{data-set-id}/flow/activate
PUT /data_sinks/{data-sink-id}/flow/activate

Activate entire flow:

PUT /data_sets/{data-set-id}/flow/activate?all=1
PUT /flows/{flow-node-id}/activate?full_tree=1

Pause Flow

Pause all components of a flow from a specific resource downstream, or the entire flow.

Pause Flow: Request
PUT /flows/{flow-node-id}/pause
PUT /data_sources/{data-source-id}/flow/pause
PUT /data_sets/{data-set-id}/flow/pause
PUT /data_sinks/{data-sink-id}/flow/pause

Pause entire flow:

PUT /data_sets/{data-set-id}/flow/pause?all=1
PUT /flows/{flow-node-id}/pause?full_tree=1

Delete Flow

Delete a flow and all its downstream resources, or the entire flow including upstream resources.

Delete Flow: Request
DELETE /flows/{flow-node-id}
DELETE /data_sources/{data-source-id}/flow
DELETE /data_sets/{data-set-id}/flow
DELETE /data_sinks/{data-sink-id}/flow

Delete entire flow:

DELETE /data_sets/{data-set-id}/flow?all=1
DELETE /flows/{flow-node-id}?full_tree=1

Change Ownership

The flows API supports changing the owner and org of all resources composing a flow. This PUT request is supported for Nexla super-users only and allows Nexla admins to set up and test flows in their own accounts on behalf of customers, and then transfer the working flows to the appropriate User and Org.

Change Flow Ownership: Request
PUT /flows/{flow-node-id}
PUT /data_sources/{data-source-id}/flow
PUT /data_sets/{data-set-id}/flow
PUT /data_sinks/{data-sink-id}/flow

Update entire flow:

PUT /data_sets/{data-set-id}/flow?all=1
PUT /flows/{flow-node-id}?full_tree=1
Change Flow Ownership: Request Body
{
"owner_id": 6,
"org_id": 2,
"include_data_credentials": true,
"include_code_containers": true
}

Ownership Change Behavior

MethodEndpointAction
PUT/flows/{flow-node-id}Only the flow node and downstream flow resources changed. Include ?all=1 to update upstream resources.
PUT/data_sources/{data-source-id}/flowAll flows originating from the data source updated to new owner/org. Use with caution!
PUT/data_sets/{data-set-id}/flowOnly the data set and downstream resources changed. Include ?all=1 to update upstream resources.
PUT/data_sinks/{data-sink-id}/flowOnly the data sink and downstream resources changed. Include ?all=1 to update upstream resources.

Note: By default, code containers (transforms, attribute transforms, validators) and data credentials are not transferred to the new owner as they can be used in other flows and resources. To force ownership change for code containers and data credentials, include the include_code_containers and include_data_credentials flags in your request.

Individual Resource Updates

For detailed configuration changes, update individual resources directly. These operations allow you to modify specific aspects of your flows without affecting the entire flow structure.

  • Data Sources: PUT /data_sources/{id}
  • Data Sets: PUT /data_sets/{id}
  • Data Sinks: PUT /data_sinks/{id}
  • Transforms: PUT /transforms/{id}
  • Data Maps: PUT /data_maps/{id}

Flow Type Updates

Flow types (streaming, in_memory, replication) must be set during creation and cannot be modified after creation. If you need to change the flow type, you'll need to recreate the flow with the desired configuration.

Legacy Endpoints

Note: The legacy /data_flows endpoints are still available for backward compatibility but are deprecated. It's recommended to use the new /flows endpoints for all new development.

The legacy endpoints include:

  • PUT /data_flows/data_source/{data_source_id}/activate - Activate flows by data source
  • PUT /data_flows/data_source/{data_source_id}/pause - Pause flows by data source
  • PUT /data_flows/data_source/{data_source_id} - Change ownership of flows by data source