Updated on 2025-11-17 GMT+08:00

Importing subjects

Function

Used to import themes.

Calling Method

For details, see Calling APIs.

URI

POST /v2/{project_id}/design/catalogs/action

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

action-id

Yes

LIST<STRING>

Action to be performed.

Options:

  • start-import: The import starts.

skip_exist

No

Boolean

Whether to overwrite the existing theme.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header).

This field is mandatory for authentication using tokens.

workspace

Yes

String

Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID.

X-Project-Id

No

String

Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

This parameter is mandatory for API requests that use AK/SK authentication in multi-project scenarios.

Content-Type

No

String

Default value: application/json;charset=UTF-8

This parameter is optional. If the body is available, this parameter is mandatory. If the body is unavailable, you do not need to set this parameter or verify it.

Table 4 FormData parameters

Parameter

Mandatory

Type

Description

file

Yes

File

Excel file used for importing themes. The file size must be less than 4 MB and the number of lines must be less than 3000.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

data

data object

Returned data information.

Table 6 data

Parameter

Type

Description

uuid

String

Unique ID returned by the import API

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

data

Object

Returned data information.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

data

Object

Returned data information.

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

data

Object

Returned data information.

Example Requests

Upload the theme Excel file and submit it through the form. The file is a specific Excel file.

POST https://{endpoint}/v2/{project_id}/design/catalogs/action?action-id=start-import&skip_exist=false

Example Responses

Status code: 200

Success. The returned data is the UUID of the import task. You can query the import result based on the UUID.

{
  "data" : {
    "uuid" : "82f70d35-f61a-46dc-a245-0b86905e82d1"
  }
}

Status Codes

Status Code

Description

200

Success. The returned data is the UUID of the import task. You can query the import result based on the UUID.

400

BadRequest

401

Unauthorized

403

Forbidden