Import models, relationship modeling, dimension modeling, code tables, service indicators, and process architecture.
Function
Import models, relationship modeling, dimension modeling, code tables, service indicators, and process architecture.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/design/models/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 |
String |
Action to be executed. Select an import action based on the imported object. Options:
|
|
model_id |
No |
String |
ID of a relational modeling model. This parameter is mandatory when a model (import_relation) is imported. |
|
directory_id |
No |
String |
ID of the target directory. This parameter is optional and takes effect for importing a lookup table (import_datastandard) or data standard (import_datastandard). |
|
skip_exist |
No |
Boolean |
Whether to overwrite the existing entity. |
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. |
|
X-Language |
No |
String |
Default value: en-us. This parameter is optional, but is mandatory for import and export APIs. Available options include zh-cn and en-us, indicating Chinese and English, respectively. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
file |
Yes |
File |
The size of the Excel file to be imported 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 model Excel file and submit it through the form. The file is a specific file.
POST https://{endpoint}/v2/{project_id}/design/models/action?action-id=import_relation&skip_exist=false&model_id=1208730797675311104
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.