Unify and manage your data

Delete Task Files for Tenant API

Learn more about deleting result files for an export task in a specified tenant.

The Delete Task Files for Tenant deletes files generated by the export service that are stored in a Reltio bucket. If the files are 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.

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 in a specified tenant.

DELETE {ExportServiceURL}/{Tenant}/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
TenantStringYes

Unique identifier of the tenant where you want to delete the result files.

Example: jsmith123

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}/{Tenant}/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}/{Tenant}/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 custom destination
DELETE {ExportServiceURL}/{Tenant}/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 that belongs to another tenant
DELETE {ExportServiceURL}/{Tenant}/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}/{Tenant}/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}/{Tenant}/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 for Tenant deletes files from the Reltio bucket only.Delete the files in your own storage.
404 Not Found101No task is found for this taskId in the specified {Tenant}. If the task belongs to another tenant, the API returns this error.Confirm {Tenant} and the task ID, then resend the request.