Skip to content

Workspace Resource Export



POST /api/v1/workspace/resource/export/task/create

Overview

Initiate a workspace resource export task.

Parameter Details

1. Interface Purpose

Initiate a resource export task for the current workspace.

This is an asynchronous task interface. Upon successful call, only taskId is returned, not the compressed package content immediately.

The recommended calling process is as follows:

  1. Call this interface to obtain taskId.
  2. Poll the task status by calling GET /api/v1/workspace/resource/query_action_status.
  3. Once the status changes to ok, retrieve the export file information from the result returned by the status interface.

2. Request Description

This interface does not require a request body. It exports data from the workspace associated with the DF-API-KEY by default.


3. Response Description

Example of a successful response:

{
  "taskId": "task_xxx"
}

Notes: - taskId is returned as long as the task creation is successful. - Subsequent export execution failures or partial resource export failures need to be checked via the task status interface.


4. Current Resource Boundary Description

The current workspace resource import/export has the following boundaries:

  1. Environment variables do not include those with scope=rum.
  2. Log indices do not include external indices and default.
  3. Field management only processes workspace custom fields.
  4. Data access is currently not supported for workspace import/export.

5. Export Result Additional Notes

If the export of a single object within a resource fails, it will not interrupt the entire export task. Relevant failure details will be recorded in import_info.exportFailedInfo returned by the task status interface.

Request Example

curl 'https://openapi.truewatch.com/api/v1/workspace/resource/export/task/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed

Response

{
    "code": 200,
    "content": {
        "taskId": "task_xxx"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}