Help Center/ DataArts Insight/ API Reference/ Resource Migration/ Obtaining Import Task Details
Updated on 2025-02-25 GMT+08:00

Obtaining Import Task Details

Function

This API is used to obtain details about import tasks.

URI

GET /v1/{project_id}/resource-package/import-tasks/{task_id}

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

For how to obtain a project ID, see Obtaining a Project ID.

task_id

Yes

String

ID of an import task.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Workspace-Id

Yes

String

Workspace ID. For how to obtain it, see Obtaining a Workspace ID.

X-Auth-Token

Yes

String

User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token.

Response Parameters

Table 3 Response body parameters

Parameter

Type

Description

id

String

Task ID.

name

String

Import name.

domain_id

String

Domain ID.

project_id

String

Project ID.

workspace_id

String

Workspace ID.

import_param

String

List of import parameters.

obs_bucket

String

OBS bucket name.

obs_object_key

String

OBS object path.

import_detail

String

Import details.

status

Integer

Result status. The options include -1 (not activated), 0 (to be processed), 1 (successful), 2 (failed), 3 (partially successful), and 4 (being processed).

Enumerated values:

  • -1
  • 0
  • 1
  • 2
  • 3
  • 4

error_msg

String

Task failure cause.

import_type

String

Import type. The options include import (resource package import) and crossSpaceImport (cross-workspace one-click import).

create_user

String

Creator ID.

create_user_name

String

Creator name.

create_date

Long

Creation timestamp.

update_date

Long

Update timestamp.

Example Request

GET https://{endpoint}/v1/{project_id}/resource-package/import-tasks/{task_id}

Example Response

Import task details are successfully obtained.

{
  "id" : "2406a337-xxxx-a5b2-b01a61d2043b",
  "name" : "string",
  "domain_id" : "ad9e2f08-xxxx-87eb-1f9619b6c313",
  "project_id" : "string",
  "workspace_id" : "12913c92-xxxx-b8fd-a72af3945b61",
  "import_param" : "",
  "obs_bucket" : "test",
  "obs_object_key" : "test.zip",
  "import_detail": "Import successful. [Export resource list] Data source: 1; [Import parameter list]: Target workspace: sample workspace; Replace: false; Carry permission information: false",
  "status" : 1,
  "error_msg" : "string",
  "import_type" : "import|crossSpaceImport",
  "create_user" : "string",
  "create_user_name" : "string",
  "create_date" : 9223372036854776000,
  "update_date" : 9223372036854776000
}

Status Codes

Table 4 Status code

Status Code

Description

200

Import task details are successfully obtained.

Error Codes

See Error Codes.