delete_datasource_dataflow

DatasourcesApi.delete_datasource_dataflow(datasource_id, id, role_id, action=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Delete a datasource dataflow

Deletes an existing dataflow. The caller (identified by role_id) must have at least owner permission on the datasource (else AUTH-1012). Supports JDBC Bulkload, JDBC Advanced Load, SaaS, Streams, and ArcGIS. Soft vs permanent delete and whether action is used depend on type (see action). Not idempotent for soft delete when the flow is already deleted (SaaS/Streams return GE-1034).

Parameters:
  • datasource_id (str) – UUID of the parent datasource. Rejected with IPV-1045 if missing. Advanced Load / ArcGIS disabled by admin return DTSC-1025. (required)

  • id (str) – UUID of the dataflow (DataflowId). Rejected with IPV-1045 if missing. (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to with at least owner access on the datasource. (required)

  • action (str) – JDBC Bulkload: omit for soft delete, or permanent-delete to remove the record after soft delete. If any query params are sent, action must be permanent-delete (action=delete is rejected with IPV-1045). SaaS and Streams: delete (default when omitted) soft-deletes; permanent-delete removes the DynamoDB record. JDBC Advanced Load and ArcGIS: action is not used (ArcGIS always hard-deletes the record).

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

DeleteDatasourceDataflowResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: DELETE /datasources/{datasource_id}/dataflows/{id}

Success (HTTP 200)

Deletion accepted. Typical messages: “Successfully deleted dataflow” (soft delete or ArcGIS/Advanced sync remove), “Permanently deleted dataflow” (permanent-delete), “Successfully triggered dataflow deletion and is running in background” (JDBC Bulk/Advanced async delete).

Soft delete (SaaS/Streams/Bulk sync; ArcGIS)

{
  "Message": "Successfully deleted dataflow"
}

action=permanent-delete

{
  "Message": "Permanently deleted dataflow"
}

JDBC Bulkload / Advanced Load async delete

{
  "Message": "Successfully triggered dataflow deletion and is running in background"
}

Errors

Documented error codes: AUTH-1012, IPV-1045, GE-1034, GE-1043, IPV-1002, IPV-1008, DTSC-1007, DB-1002, DB-1003, GE-1020, GE-1021.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1012 (no owner access), IPV-1045 (missing/invalid datasource, dataflow, or Bulk action), GE-1034 (SaaS/Streams invalid action, already deleted, or Streams delete failure), GE-1043 (ArcGIS metadata update in progress), IPV-1002 / IPV-1008 (SaaS flow missing or not owned by datasource).

Caller lacks owner access

{
  "Message": "AUTH-1012 - User: user1 requires at least owner access on the resource to perform this action."
}

JDBC Bulkload query action not permanent-delete

{
  "Message": "IPV-1045 - Only 'action' query param is allowed or invalid value is provided for action query param "
}

SaaS/Streams soft delete when already deleted

{
  "Message": "GE-1034 - Dataflow already deleted."
}

ArcGIS metadata update in progress

{
  "Message": "GE-1043 - A metadata update is in progress for this dataflow. Please wait for it to complete before deleting."
}

HTTP 500

Backend failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: DTSC-1007 (invalid Advanced/Bulk state, dependent schedule/pipeline/ insights, or delete blocked while DMS is starting), DB-1002 / DB-1003 (DynamoDB update/delete failed), GE-1020 / GE-1021 (persist failures).

Advanced Load not in a deletable state

{
  "Message": "DTSC-1007 - Datasource operation failed with error - DataflowStatus is not in valid state. Deletion operation is not allowed"
}

Dependent insights dashboards block delete

{
  "Message": "DTSC-1007 - Datasource operation failed with error - Please delete dependent dashboards with insight widgets: '['Sales Insights']' associated with this dataflow before deleting the dataflow"
}