Importing subjects
Function
Used to import themes.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/design/catalogs/action
|
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. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action-id |
Yes |
LIST<STRING> |
Action to be performed. Options:
|
|
skip_exist |
No |
Boolean |
Whether to overwrite the existing theme. |
Request 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. |
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
data object |
Returned data information. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Object |
Returned data information. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Object |
Returned data information. |
Status code: 403
|
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 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.