Workspace Resource Export¶
POST /api/v1/workspace/resource/export/task/create
Overview¶
Initiate a resource export task for the current workspace.
Supplementary Parameter Notes¶
1. API Purpose
Initiates a resource export task for the current workspace.
This API is an asynchronous task interface. After a successful call, it only returns taskId; it does not return the archive contents immediately.
The recommended call flow is as follows:
- Call this API to obtain
taskId. - Poll the task status by calling
GET /api/v1/workspace/resource/query_action_status. - Once the status becomes
ok, obtain the exported file information from the result returned by the status API.
2. Request Description
When no request body is provided, all resources of the workspace to which DF-API-KEY belongs are exported by default.
To export SLO resources, call POST /api/v1/slo/export/task/create; this API is only used to export the complete set of workspace resources.
3. Response Description
Example of a successful response:
Notes:
taskIdis returned as soon as the task is created successfully.- Any subsequent export execution failures or partial resource export failures must be checked through the task status API.
4. Current Resource Scope
The current workspace resource import/export has the following boundaries:
- Environment variables do not include
scope=rum. - Log indexes do not include external indexes or
default. - Field management only processes custom fields of the workspace.
- Data Access currently does not support workspace import/export.
5. Additional Notes on Export Results
If a single object within a resource fails to export, the entire export task will not be interrupted.
The import_info.exportInfo.resourceFailureInfo field of the task status API returns deduplicated resource-level failure details, including resource type, resource UUID, resource name, stable failure reason, and affected SLOs. It does not return resource configurations, permission members, exception stacks, or sensitive fields.
The legacy import_info.exportFailedInfo field is retained for compatibility with older clients, but displaying the raw exception information in it directly is not recommended.
Example Request¶
curl 'https://openapi.guance.com/api/v1/workspace/resource/export/task/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed