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.
| Parameter | Type | Required | Description |
|---|---|---|---|
Tenant | String | Yes |
Unique identifier of the tenant where you want to delete the result files. Example: |
taskId | String | Yes | Unique identifier of the export task. Example: |
Request headers
The following request headers must be included.
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <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.
| Parameter | Type | Description |
|---|---|---|
status | String | Result 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.
| Scenario | Request | Response |
|---|---|---|
Task has no result files (for example, FAILED before any output was written) |
|
There are no files to remove. |
| Delete files that were already deleted |
| The operation is idempotent; no error is returned. |
| Delete files exported to a custom destination |
|
|
| Delete files for a task that belongs to another tenant |
|
|
Delete files for a task in PROCESSING |
|
|
Delete files for a task in PAUSED |
|
|
Error codes and recommended actions
The following table lists the possible error responses returned by this API.
| HTTP status | Error code | Description | Recommended action |
|---|---|---|---|
400 Bad Request | 437 | The task is in an active state. The errorMessage names the current status. Active statuses: | Resend the request after the task status is COMPLETED, FAILED, or CANCELED. |
400 Bad Request | 565 | The 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 Found | 101 | No 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. |