Unify and manage your data

Delete Task Files API

Learn more about deleting result files for an export task using Delete Task Files.

The Delete Task Files deletes files generated by the export service that are stored in a Reltio bucket. If the task is part of a group, the API deletes files for all tasks in the group. If the files are stored in a custom destination, the API does not delete them and returns an error. For Reltio bucket paths and custom destinations, see Store export results. To delete files for a specific tenant, see Delete Task Files for Tenant API.

The following role can delete the result files:

HTTP method and endpoint

Use the following HTTP method and endpoint path to submit the request for deleting result files of an export task.

DELETE {ExportServiceURL}/tasks/{taskId}/_files

Replace {ExportServiceURL} with the Export Service URL for your environment, for example, http://example.reltio.com/jobs.

The following table describes the endpoint path parameters.

ParameterTypeRequiredDescription
taskIdStringYesUnique identifier of the export task.

Example: 4313a9ff-a3a1-4a8e-bd90-d508b9f2ac66

Request headers

The following request headers must be included.

HeaderValueRequired
AuthorizationBearer <access_token>Yes

Request body

This operation does not require a request body.

Example request

Use the following example to see how a complete request is structured with headers to delete result files.

DELETE {ExportServiceURL}/tasks/{taskId}/_files

Response body

The following table describes the fields returned in the response body.

ParameterTypeDescription
statusStringResult of a successful delete. Value: success. Failures return an error response instead of this field. See Error codes and recommended actions.

Example response

The following example shows a response with a successful delete.

{
    "status": "success"
}

Additional examples

The following table lists additional sample requests and responses.

ScenarioRequestResponse
Task has no result files (for example, FAILED before any output was written)
DELETE {ExportServiceURL}/tasks/{taskId}/_files
{"status": "success"}
There are no files to remove
Delete files that were already deleted
DELETE {ExportServiceURL}/tasks/{taskId}/_files
{"status": "success"}
The operation is idempotent; no error is returned.
Delete files exported to a destination you configure
DELETE {ExportServiceURL}/tasks/{taskId}/_files
{"severity": "Error", "errorMessage": "Operation not permitted", "errorCode": 565, "errorDetailMessage": "Files exported to a custom destination cannot be deleted"}
Delete files for a task ID that does not exist
DELETE {ExportServiceURL}/tasks/{taskId}/_files
{"severity": "Error", "errorMessage": "Object with id={taskId} not found", "errorCode": 101, "errorDetailMessage": "No object with specified id found"}
Delete files for a task in PROCESSING
DELETE {ExportServiceURL}/tasks/{taskId}/_files
{"severity": "Error", "errorMessage": "This operation can not be done with task in PROCESSING state.", "errorCode": 437, "errorDetailMessage": "This operation can not be done with task in PROCESSING state."}
Delete files for a task in PAUSED
DELETE {ExportServiceURL}/tasks/{taskId}/_files
{"severity": "Error", "errorMessage": "This operation can not be done with task in PAUSED state.", "errorCode": 437, "errorDetailMessage": "This operation can not be done with task in PAUSED state."}

The following table lists the possible error responses returned by this API.

HTTP statusError codeDescriptionRecommended action
400 Bad Request437The task is in an active state. The errorMessage names the current status.

Active statuses: SCHEDULED, SCHEDULED_POLL, SCHEDULED_CANCELLING, PROCESSING, WAITING_FOR_RESOURCE, PAUSING, PAUSED, CANCELING, WAITING, WAITING_FOR_QUEUE.

Resend the request after the task status is COMPLETED, FAILED, or CANCELED.
400 Bad Request565The export wrote files to a custom destination. Delete Task Files deletes files from the Reltio bucket only.Delete the files in your Reltio storage.
404 Not Found101No task is found for this taskId. Confirm the task ID and resend the request.