This document demonstrates how to retry file tasks in DocFlow through REST API. When file processing fails or needs to be reprocessed, you can use the retry interface.
DocFlow provides a file retry interface that supports reprocessing specified tasks. The retry operation will re-execute the complete processing flow including upload, parsing, classification, splitting, extraction, etc.
Important Restriction: Only tasks that have extraction succeeded or failed, and are main tasks or parent tasks, can be retried. Child tasks do not support retry operations.
Retry File Processing
Reprocess files corresponding to specified task IDs:
curl -X POST \
-H "x-ti-app-id: <your-app-id>" \
-H "x-ti-secret-code: <your-secret-code>" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "<your-workspace-id>",
"task_id": "1978297791713619968"
}' \
"https://docflow.textin.com/api/app-api/sip/platform/v2/file/retry"
Parameter Description
Required Parameters
workspace_id: Workspace ID. Please refer to the Get Workspace ID documentation.
task_id: Task ID. Can be obtained from the file upload interface response or through query interfaces.
Response Description
After successful retry, the interface returns a standard response:
{
"code": 200,
"msg": "success"
}
code: Response status code, 200 indicates success
msg: Response message
Use Cases
The retry interface is suitable for the following scenarios:
- Failed Processing Retry: When file processing fails, you can call the retry interface to reprocess
- Retry After Configuration Update: After updating classification, extraction, and other configurations, you can reprocess already processed files to apply new configurations
Important Notes
Retry Restrictions: Only tasks that have extraction succeeded or failed, and are main tasks or parent tasks, can be retried. Child tasks do not support retry operations.
- Task Status: The retry operation will reprocess files, and existing processing results may be overwritten
- Processing Time: The retry operation needs to re-execute the processing flow, which may take some time. It is recommended to check the task status through query interfaces
- Task Type Restriction: Only main tasks or parent tasks can be retried. Child tasks do not support retry
- Extraction Status Restriction: Only tasks with extraction succeeded or failed status can be retried