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.
| Parameter | Type | Required | Description |
|---|---|---|---|
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}/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 destination you configure |
|
|
| Delete files for a task ID that does not exist |
|
|
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 deletes files from the Reltio bucket only. | Delete the files in your Reltio storage. |
404 Not Found | 101 | No task is found for this taskId. | Confirm the task ID and resend the request. |