bulk_delete_datasets

DatasetsApi.bulk_delete_datasets(role_id, dataset_id_list, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Batch delete datasets

Triggers asynchronous bulk deletion of datasets via a Step Functions state machine. Caller must have owner access on each dataset for it to be deleted. Datasets where the caller is not the owner are skipped (not deleted). The DatasetIds list must be non-empty. Deletion is processed asynchronously — an email notification with a PDF report is sent upon completion showing per-dataset results (delete-triggered, delete-success, or delete-failed with reason).

Parameters:
  • role_id (str) – Amorphic role ID the request is authorized against. Used for TBAC permission validation on datasets with tag-based access. (required)

  • dataset_id_list (DatasetIdList) – (required)

  • content_type (str)

  • _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:

BatchDeleteDatasetsResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /datasets/batch-delete

Request

Request / response example

{
  "DatasetIds": [
    "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
    "a2f7d3b1-8e5c-4a6f-9d1e-2b3c4d5e6f7a"
  ]
}

Success (HTTP 200)

Bulk deletion triggered successfully. The actual deletion runs asynchronously via Step Functions. An email with a PDF report is sent when processing completes.

Request / response example

{
  "Message": "Datasets bulk deletion triggered! Once completed, you will receive an email notification with more info!"
}

Errors

Documented error codes: DS-1009, RTE-1001.

HTTP 400

Validation failure. Error code DS-1009 when DatasetIds list is empty.

DatasetIds list is empty

{
  "Message": "DS-1009 - No input datasets to delete."
}

HTTP 500

Backend failure. Error code RTE-1001 for unhandled exceptions (e.g. Step Functions invocation failure).

Request / response example

{
  "Message": "RTE-1001 - An error occurred (StateMachineDoesNotExist) when calling the StartExecution operation."
}