Exporting Service Data
Function
Export service data based on request parameters. The following data can be exported: code table, data standard, atomic metric, derivative metric, compound metric, summary table, service metric, theme, process, logical model, physical model, dimension, and fact table.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/design/export-model
|
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. |
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 |
|---|---|---|---|
|
ids |
No |
Array of strings |
List of exported object IDs, for example, IDs of several logical models. The list is a string. |
|
asyn |
No |
Boolean |
Indicates whether to export data asynchronously. The options are true (asynchronous) and false (synchronous). |
|
type |
No |
String |
Exported service type. The options are ER (relational modeling), Directory_CodeTable (code table directory), Directory_Standard (standard directory), DIM (dimension modeling), codeTable (code table), and dataStandard. directory_id is used to export code tables and data standards in a specified directory. model_id and biz_catalog_id are used to export specified models and service tables in a directory. import_bizcatalog is used to export the process architecture. import_bizmetric is used to export service indicators. |
|
directory_id |
No |
String |
Directory ID, which is a string |
|
biz_catalog_id |
No |
String |
ID of the service layer, which is a string |
|
biz_catalog_id_list |
No |
Array of strings |
ID list of the service catalog to which the service belongs. |
|
model_id |
No |
String |
ID of the relational model to which the model belongs. This parameter is required for exporting a relational model. The ID is a string. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
data object |
Returned data information. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
|
error_msg |
String |
Error message |
|
data |
Object |
Returned data information. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
|
error_msg |
String |
Error message |
|
data |
Object |
Returned data information. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
|
error_msg |
String |
Error message |
|
data |
Object |
Returned data information. |
Example Requests
Export service data whose model ID is 1213499006739791872 and table IDs are 1226583503525818368 and 1217121407599800322 from the relational modeling.
POST https://{endpoint}/v2/{project_id}/design/export-model
{
"asyn" : "true",
"type" : "ER",
"model_id" : "1213499006739791872",
"ids" : [ "1226583503525818368", "1217121407599800322" ]
}
Example Responses
Status code: 200
Success
{
"data" : {
"uuid" : "fd653968-864b-45f6-9842-2b125d2dbfb7"
}
}
Status code: 400
BadRequest
{
"error_code" : "DS.60xx",
"error_msg" : "The user request is illegal."
}
Status code: 401
Unauthorized
{
"error_code" : "DS.60xx",
"error_msg" : "User authentication failed."
}
Status code: 403
Forbidden
{
"error_code" : "DS.60xx",
"error_msg" : "The user does not have permission to call this API."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Success |
|
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.