Workspace Resource Task Status Query¶
GET /api/v1/workspace/resource/query_action_status
Overview¶
Query the status of workspace resource import/export tasks.
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| taskId | string | Y | Task ID Example: task_xxx Allow empty: False |
Parameter Supplementary Notes¶
1. Interface Purpose
Query the execution status of workspace resource import or export tasks.
The returned structure is consistent with the frontend interface, suitable for: - Export task result queries - Import task result queries - Error code and failure information queries
2. Common Status Values
| Status Value | Description |
|---|---|
start |
Task created, not yet started |
running |
Task is executing |
ok |
Task executed successfully |
error |
Task execution failed |
cancel |
Task has been canceled |
3. Common Return Field Descriptions
| Field Name | Description |
|---|---|
status |
Current task status |
action |
Task type, commonly import or export |
message |
Additional notes |
errorCode |
Error code upon failure |
import_info |
Import/export statistics and failure information |
name_list |
List of resource names attached to certain tasks |
4. Export Task Query Notes
After an export task succeeds, the status is typically ok, and information about the exported file can be obtained from the returned result.
If some objects failed during export, check:
5. Import Task Query Notes
After an import task succeeds, you can typically see in import_info:
successCountfailCount
Detailed failure reasons for certain resources will be reflected in errorCode or the internal error statistics of the import task.
6. Polling Recommendation
It is recommended to poll every 2 to 5 seconds until the status changes to:
- ok
- error
- cancel
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/workspace/resource/query_action_status?taskId=task_xxx' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed