This document demonstrates how to delete file tasks in DocFlow through REST API. The deletion operation supports multiple condition combinations, and files matching any condition will be deleted.
Delete by Batch Number
Delete all files under specified batches:Delete by Task ID
Delete files corresponding to specified task IDs:Delete by File ID
Delete files corresponding to specified file IDs:Delete by Time Range
Delete files created within specified time range:Combined Condition Deletion
Multiple conditions can be used simultaneously for deletion. Files matching any condition will be deleted:Parameter Description
Required Parameters
workspace_id
: Workspace ID. Please refer to the Get Workspace ID documentation.
Optional Parameters
Deletion conditions support the following parameters. Files matching any condition will be deleted:batch_number
: Batch number list, delete all files under specified batchestask_id
: Task ID list, delete files corresponding to specified tasksfile_id
: File ID list, delete specified filesstart_time
: Start time (epoch timestamp, unit: seconds)end_time
: End time (epoch timestamp, unit: seconds)
Response Description
After successful deletion, the interface returns the number of deleted files:deleted_count
: Actual number of deleted files
Important Notes
The deletion operation is irreversible. Once deleted, files cannot be recovered. Please ensure important data is backed up before deletion.
- Deletion Conditions: The deletion interface supports multiple condition combinations. Files matching any condition will be deleted
- Permission Control: Only files belonging to the specified workspace can be deleted
- Batch Operations: Supports batch deletion, allowing multiple files to be deleted at once
- Time Format: Time parameters use epoch timestamp (in seconds)
- Deletion Scope: The deletion operation will simultaneously delete files and their related processing results, review records, and other data