获取下展信息与已发布实体的差异
功能介绍
当已发布的实体被编辑时,其会生成下展,该接口用于获取下展信息与已发布实体的差异。
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/design/approvals/business/{biz_id}/diff
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID,获取方法请参见项目ID和账号ID。 |
biz_id |
是 |
String |
待比较下展的实体ID,填写String类型替代Long类型。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
biz_type |
是 |
String |
待删除下展的实体类型。 枚举值:
|
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
IAM Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) 使用Token认证时必选。 |
workspace |
是 |
String |
工作空间ID,获取方法请参见实例ID和工作空间ID。 |
X-Project-Id |
否 |
String |
项目ID,获取方法请参见项目ID和账号ID。 多project场景采用AK/SK认证的接口请求,则该字段必选。 |
Content-Type |
否 |
String |
默认值:application/json;charset=UTF-8 可选,有Body体的情况下必选,没有Body体则无需填写和校验。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
data |
data object |
接口返回的数据。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
版本ID,填写String类型替代Long类型。 |
version_name |
String |
版本名称。 |
version_tag |
String |
版本标记,只读。 |
description |
String |
版本描述。 |
biz_id |
String |
业务对象ID,填写String类型替代Long类型。 |
biz_type |
String |
业务实体类型。 枚举值:
|
biz_info |
String |
业务详情,只读。 |
biz_info_vo |
Object |
业务对象。 |
effect_objs |
String |
影响信息,只读。 |
change_props |
String |
变化信息,只读。 |
sql_ddl |
String |
SQL脚本,只读。 |
physical_table |
String |
生产环境创建表状态 |
dev_physical_table |
String |
开发环境创建表状态 |
technical_asset |
String |
技术资产同步状态,只读。 |
business_asset |
String |
业务资产同步状态,只读。 |
meta_data_link |
String |
资产关联状态,只读。 |
data_quality |
String |
质量作业状态,只读。 |
dlf_task |
String |
数据开发作业状态,只读。 |
materialization |
String |
码表数值落库状态,只读。 |
publish_to_dlm |
String |
DLM API生成状态,只读。 |
biz_metric |
String |
业务指标同步状态,只读。 |
summary_status |
String |
统一统计状态,只读。 |
is_current_version |
Boolean |
是否为当前版本,只读。 |
create_time |
String |
创建时间,只读,格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
create_by |
String |
创建人,只读。 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码,如DS.6000,请求处理失败。 |
error_msg |
String |
错误信息。 |
data |
Object |
返回的数据信息。 |
状态码: 401
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码,如DS.6000,请求处理失败。 |
error_msg |
String |
错误信息。 |
data |
Object |
返回的数据信息。 |
状态码: 403
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码,如DS.6000,请求处理失败。 |
error_msg |
String |
错误信息。 |
data |
Object |
返回的数据信息。 |
请求示例
获取关系建模中表ID为1217123755210469376的已发布实体与下展信息之间的差异信息。
GET https://{endpoint}/v2/{project_id}/design/approvals/business/1217123755210469376/diff?biz_type=TABLE_MODEL
响应示例
状态码: 200
Success,返回data数据是PublishVersionVO数组,以及总数。
{ "data" : { "value" : { "id" : "1227929420048830464", "version_name" : "test_l2_2_2024-04-11_10-33-07_576", "version_tag" : "test_l2_2_2024-04-11_10-33-07_576", "description" : null, "biz_id" : "1217123755210469376", "biz_type" : "TABLE_MODEL", "biz_info" : "{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"0833a573fe80d5401f6dc010a775569a\",\"updateBy\":\"0833a573fe80d5401f6dc010a775569a\",\"createTime\":1710226516000,\"updateTime\":1712802684801,\"l3Id\":\"1123655694424358912\",\"l2Id\":\"1123655694424358912\",\"alias\":null,\"encoding\":\"test_l2_2\",\"prefix\":\"test_l2_\",\"codeNum\":null,\"extendInfo\":\"{\\\"columnTag\\\":\\\" \\\",\\\"columnSecrecyLevel\\\":\\\" \\\",\\\"tableTag\\\":\\\" \\\",\\\"dirtyOutSwitch\\\":\\\"true\\\",\\\"dirtyOutDatabase\\\":\\\"default\\\",\\\"dirtyOutPrefix\\\":\\\"err_\\\",\\\"dirtyOutSuffix\\\":\\\"\\\"}\",\"id\":\"1217123755210469376\",\"description\":\"无\",\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"status\":\"DRAFT\",\"tbName\":\"test_l2_2\",\"tbLogicName\":\"test_l2_2\",\"owner\":\"\",\"queueName\":null,\"schema\":null,\"dbName\":null,\"distribute\":null,\"distributeColumn\":null,\"compression\":null,\"obsLocation\":null,\"preCombineField\":null,\"dwId\":\"5013aa3f86df4335945131ce9d242b80\",\"dwName\":\"RDS-Mysql\",\"dwType\":\"MYSQL\",\"physicalTable\":\"CREATE_FAILED\",\"devPhysicalTable\":\"NO_NEED\",\"technicalAsset\":\"CREATE_FAILED\",\"businessAsset\":\"NO_NEED\",\"metaDataLink\":\"UPDATE_FAILED\",\"dataQuality\":\"NO_NEED\",\"dlfTask\":\"NO_NEED\",\"summaryStatus\":\"SUMMARY_FAILED\",\"materialization\":null,\"publishToDlm\":null,\"envType\":\"PROD_TYPE\",\"devVersion\":null,\"prodVersion\":null,\"apiId\":null,\"tbLogicGuid\":\"30a94acc-d5bd-44cf-a751-6fb82989a7c2\",\"tbGuid\":null,\"tbId\":null,\"partitionConf\":null,\"qualityOwner\":null,\"qualityId\":null,\"useRecentlyPartition\":false,\"reversed\":null,\"dirtyOutSwitch\":true,\"dirtyOutDatabase\":\"default\",\"dirtyOutPrefix\":\"err_\",\"dirtyOutSuffix\":\"\",\"dlfTaskId\":null,\"selfDefinedFields\":[{\"fdNameCh\":\"aaa\",\"fdNameEn\":\"aaa\",\"notNull\":false,\"fdValue\":\"\",\"id\":null,\"status\":null,\"fdName\":\"aaa\",\"tenantId\":null,\"nameCh\":null,\"nameEn\":null,\"createBy\":null,\"l3Id\":null}],\"scheduleTime\":null,\"modelId\":\"1217123720355803136\",\"parentTableId\":null,\"parentTableName\":null,\"parentTableCode\":null,\"relatedLogicTableId\":\"1210601123904405504\",\"relatedLogicTableName\":\"test_l2_2\",\"relatedLogicTableModelId\":\"1184439352260976640\",\"relatedLogicTableModelName\":\"wgtest\",\"logicTbName\":\"test_l2_2\",\"logicTbGuid\":\"30a94acc-d5bd-44cf-a751-6fb82989a7c2\",\"logicTbId\":null,\"bizCatalogId\":\"1123655694424358912\",\"bizCatalogGuid\":null,\"catalogPath\":\"{\\\"l1Id\\\":\\\"1088848987810824192\\\",\\\"l2Id\\\":\\\"1123655694424358912\\\",\\\"l3Id\\\":\\\"\\\",\\\"l4Id\\\":\\\"\\\",\\\"l5Id\\\":\\\"\\\",\\\"l6Id\\\":\\\"\\\",\\\"l7Id\\\":\\\"\\\"}\",\"secretType\":\"PUBLIC\",\"tableType\":\"MYSQL_TABLE\",\"dataFormat\":\"Parquet\",\"configs\":\"{}\",\"obsBucket\":null,\"approval\":null,\"tags\":[{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"test_uesr\",\"updateBy\":\"0833a573fe80d5401f6dc010a775569a\",\"createTime\":1712800606000,\"updateTime\":1712801851000,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1196773541052301312\",\"tagId\":\"1196773541052301312\",\"bizId\":\"1217123755210469376\",\"tagName\":\"aaa\",\"bizType\":\"TABLE_MODEL\",\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"status\":null,\"nameCh\":null,\"nameEn\":null,\"lastL2Id\":null}],\"secrecyLevels\":null,\"attributes\":[{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"0833a573fe80d5401f6dc010a775569a\",\"updateBy\":\"0833a573fe80d5401f6dc010a775569a\",\"createTime\":1710226516000,\"updateTime\":1710849845000,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":\"LP070248\",\"prefix\":\"LP\",\"codeNum\":\"070248\",\"id\":\"1217123755210469377\",\"nameEn\":\"id\",\"nameCh\":\"id\",\"description\":null,\"obsLocation\":null,\"dataType\":\"VARCHAR\",\"isPrimaryKey\":true,\"isPartitionKey\":false,\"isForeignKey\":false,\"extendField\":false,\"ordinal\":1,\"tableModelId\":null,\"relatedLogicAttrId\":\"1210601124399333376\",\"relatedLogicAttrName\":\"id\",\"relatedLogicAttrNameEn\":\"id\",\"standRowId\":null,\"standRowName\":null,\"tags\":[{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"test_uesr\",\"updateBy\":\"test_uesr\",\"createTime\":1712802684000,\"updateTime\":1712802684000,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"112667\",\"tagId\":\"1196773541052301312\",\"bizId\":\"1217123755210469377\",\"tagName\":\"aaa\",\"bizType\":\"TABLE_MODEL\",\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"status\":null,\"nameCh\":null,\"nameEn\":null,\"lastL2Id\":null}],\"secrecyLevels\":null,\"dataTypeExtend\":null,\"domainType\":\"STRING\",\"qualityInfos\":[],\"standElementValues\":null,\"selfDefinedFields\":[],\"notNull\":true,\"code\":\"LP070248\",\"bizCatalogId\":null,\"status\":null,\"tenantId\":null,\"lastL2Id\":null},{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":null,\"updateBy\":null,\"createTime\":1712802684756,\"updateTime\":1712802684756,\"l3Id\":null,\"l2Id\":null,\"alias\":\"\",\"encoding\":\"\",\"prefix\":null,\"codeNum\":null,\"id\":\"0\",\"nameEn\":\"add_column\",\"nameCh\":\"add_column\",\"description\":\"\",\"obsLocation\":null,\"dataType\":\"DOUBLE\",\"isPrimaryKey\":false,\"isPartitionKey\":false,\"isForeignKey\":false,\"extendField\":false,\"ordinal\":2,\"tableModelId\":null,\"relatedLogicAttrId\":null,\"relatedLogicAttrName\":null,\"relatedLogicAttrNameEn\":null,\"standRowId\":null,\"standRowName\":null,\"tags\":[],\"secrecyLevels\":null,\"dataTypeExtend\":\"\",\"domainType\":\"NUMBER\",\"qualityInfos\":null,\"standElementValues\":null,\"selfDefinedFields\":[],\"notNull\":false,\"code\":\"\",\"bizCatalogId\":null,\"status\":null,\"tenantId\":null,\"lastL2Id\":null}],\"relations\":[{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"test_uesr\",\"updateBy\":\"test_uesr\",\"createTime\":1712802684757,\"updateTime\":1712802684757,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1219738211841208320\",\"name\":\"test_l2_1_test_l2_2_1-wg测试\",\"role\":null,\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"sourceTableId\":\"1217123755206275075\",\"sourceTableName\":\"test_l2_1\",\"sourceTableDb\":null,\"targetTableId\":\"1217123755210469376\",\"targetTableName\":\"test_l2_2\",\"targetTableDb\":null,\"sourceType\":\"ONE\",\"targetType\":\"ONE\",\"mappings\":[{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"test_uesr\",\"updateBy\":\"test_uesr\",\"createTime\":1712802684757,\"updateTime\":1712802684757,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1219738214261321728\",\"relationId\":\"1219738211841208320\",\"sourceFieldId\":\"1217123755206275076\",\"sourceFieldName\":\"id\",\"targetFieldId\":\"1217123755210469377\",\"targetFieldName\":\"id\",\"status\":null,\"tenantId\":null,\"nameCh\":null,\"nameEn\":null,\"lastL2Id\":null}],\"status\":null,\"nameCh\":\"test_l2_1_test_l2_2_1-wg测试\",\"nameEn\":\"test_l2_1_test_l2_2_1-wg测试\",\"lastL2Id\":null}],\"reverseRelations\":[],\"mappings\":null,\"isPartition\":false,\"code\":\"test_l2_2\",\"nameCh\":\"test_l2_2\",\"nameEn\":\"test_l2_2\",\"tagList\":[{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":null,\"updateBy\":null,\"createTime\":1712802787575,\"updateTime\":1712802787575,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1196773541052301312\",\"name\":\"aaa\",\"tenantId\":null,\"description\":null,\"newBiz\":null,\"status\":null,\"nameCh\":null,\"nameEn\":null,\"lastL2Id\":null}],\"secrecyLevelList\":[],\"lastL2Id\":\"1123655694424358912\"}", "biz_info_vo" : { "id" : "1217123755210469376", "model_id" : "1217123720355803136", "parent_table_id" : null, "parent_table_name" : null, "parent_table_code" : null, "related_logic_table_id" : "1210601123904405504", "related_logic_table_name" : "test_l2_2", "related_logic_table_model_id" : "1184439352260976640", "related_logic_table_model_name" : "wgtest", "model" : { "id" : "1217123720355803136", "name" : "mysql", "description" : "", "is_physical" : true, "frequent" : false, "top" : true, "level" : "SDI", "dw_type" : "MYSQL", "create_time" : 1710226508, "update_time" : 1710991309, "create_by" : "test_uesr", "update_by" : "test_uesr", "type" : "THIRD_NF", "biz_catalog_ids" : null, "databases" : null, "table_model_prefix" : "" }, "data_format" : "Parquet", "obs_bucket" : null, "obs_location" : null, "configs" : "{}", "table_type" : "MYSQL_TABLE", "owner" : "", "tb_name" : "test_l2_2", "dw_id" : "5013aa3f86df4335945131ce9d242b80", "db_name" : null, "queue_name" : null, "schema" : null, "extend_info" : "{\"columnTag\":\" \",\"columnSecrecyLevel\":\" \",\"tableTag\":\" \",\"dirtyOutSwitch\":\"true\",\"dirtyOutDatabase\":\"default\",\"dirtyOutPrefix\":\"err_\",\"dirtyOutSuffix\":\"\"}", "tb_guid" : null, "tb_id" : null, "logic_tb_name" : "test_l2_2", "logic_tb_guid" : "30a94acc-d5bd-44cf-a751-6fb82989a7c2", "description" : "无", "status" : "DRAFT", "logic_tb_id" : null, "biz_catalog_id" : "1123655694424358912", "catalog_path" : "l52/test_l2_3", "create_by" : "test_uesr", "update_by" : "test_uesr", "create_time" : 1710226516, "update_time" : 1.712802684801E9, "tags" : [ { "id" : "1196773541052301312", "tag_id" : "1196773541052301312", "tag_name" : "aaa", "biz_id" : "1217123755210469376", "biz_type" : "TABLE_MODEL", "create_by" : "test_uesr", "update_by" : "test_uesr", "create_time" : 1712800606, "update_time" : 1712801851 } ], "attributes" : [ { "id" : "1217123755210469377", "name_en" : "id", "name_ch" : "id", "description" : null, "obs_location" : null, "create_by" : "test_uesr", "update_by" : "test_uesr", "data_type" : "VARCHAR", "domain_type" : "STRING", "data_type_extend" : null, "is_primary_key" : true, "is_partition_key" : false, "is_foreign_key" : false, "extend_field" : false, "not_null" : true, "ordinal" : 1, "table_model_id" : null, "create_time" : 1710226516, "update_time" : 1710849845, "tags" : [ { "id" : "112667", "tag_id" : "1196773541052301312", "tag_name" : "aaa", "biz_id" : "1217123755210469377", "biz_type" : "TABLE_MODEL", "create_by" : "test_uesr", "update_by" : "test_uesr", "create_time" : 1712802684, "update_time" : 1712802684 } ], "secrecy_levels" : null, "stand_row_id" : null, "stand_row_name" : null, "quality_infos" : [ ], "alias" : null, "self_defined_fields" : [ ], "code" : "LP070248", "related_logic_attr_id" : "1210601124399333376", "related_logic_attr_name" : "id", "related_logic_attr_name_en" : "id" }, { "id" : "0", "name_en" : "add_column", "name_ch" : "add_column", "description" : "", "obs_location" : null, "create_by" : null, "update_by" : null, "data_type" : "DOUBLE", "domain_type" : "NUMBER", "data_type_extend" : "", "is_primary_key" : false, "is_partition_key" : false, "is_foreign_key" : false, "extend_field" : false, "not_null" : false, "ordinal" : 2, "table_model_id" : null, "create_time" : 1.712802684756E9, "update_time" : 1.712802684756E9, "tags" : [ ], "secrecy_levels" : null, "stand_row_id" : null, "stand_row_name" : null, "quality_infos" : null, "alias" : "", "self_defined_fields" : [ ], "code" : "", "related_logic_attr_id" : null, "related_logic_attr_name" : null, "related_logic_attr_name_en" : null } ], "mappings" : null, "relations" : [ { "id" : "1219738211841208320", "source_table_id" : "1217123755206275075", "target_table_id" : "1217123755210469376", "name" : "test_l2_1_test_l2_2_1-wg测试", "source_table_name" : "test_l2_1", "target_table_name" : "test_l2_2", "role" : null, "tenant_id" : "0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70", "source_type" : "ONE", "target_type" : "ONE", "create_by" : "test_uesr", "update_by" : "test_uesr", "create_time" : 1.712802684757E9, "update_time" : 1.712802684757E9, "mappings" : [ { "id" : "1219738214261321728", "relation_id" : "1219738211841208320", "source_field_id" : "1217123755206275076", "target_field_id" : "1217123755210469377", "source_field_name" : "id", "target_field_name" : "id", "create_by" : "test_uesr", "update_by" : "test_uesr", "create_time" : 1.712802684757E9, "update_time" : 1.712802684757E9 } ] } ], "dw_type" : "MYSQL", "dw_name" : "RDS-Mysql", "l1" : "l52", "l2" : "test_l2_3", "l3" : null, "l1_id" : "1088848987810824192", "l2_id" : "1123655694424358912", "l3_id" : null, "partition_conf" : null, "dlf_task_id" : null, "use_recently_partition" : false, "reversed" : null, "dirty_out_switch" : true, "dirty_out_database" : "default", "dirty_out_prefix" : "err_", "dirty_out_suffix" : "", "quality_owner" : null, "quality_id" : null, "distribute" : null, "distribute_column" : null, "compression" : null, "pre_combine_field" : null, "is_partition" : false, "physical_table" : "CREATE_FAILED", "dev_physical_table" : "NO_NEED", "technical_asset" : "CREATE_FAILED", "business_asset" : "NO_NEED", "meta_data_link" : "UPDATE_FAILED", "data_quality" : "NO_NEED", "summary_status" : "SUMMARY_FAILED", "dev_version" : null, "prod_version" : null, "dev_version_name" : null, "prod_version_name" : null, "env_type" : "PROD_TYPE", "alias" : null, "self_defined_fields" : [ { "fd_name_ch" : "aaa", "fd_name_en" : "aaa", "not_null" : false, "fd_value" : "" } ], "code" : "test_l2_2", "has_related_physical_table" : false, "has_related_logic_table" : false }, "effect_objs" : null, "change_props" : "基本信息:\r\n数据格式:CCParquet@CC\r\n\r\n\r\n\r\n表字段:\r\n\r\nadd_column : 英文名称:CCadd_column@CC 名称:CCadd_column@CC 数据类型:CCDOUBLE@CC 主键:CCfalse@CC 分区:CCfalse@CC 外键:CCfalse@CC 序号:CC2@CC 数据类型扩展:CC@CC 不为空:CCfalse@CC 编码:CC@CC .\r\n\r\n关系:\r\n\r\ntest_l2_1_test_l2_2_1-wg测试 : 名称:CCtest_l2_1_test_l2_2_1-wg测试@CC 子表:CCtest_l2_1@CC 父表:CCtest_l2_2@CC 子对父:CCONE@CC 父对子:CCONE@CC .\r\n字段映射:\r\n子表字段:CCid@CC 父表字段:CCid@CC .", "sql_ddl" : "ALTER TABLE ${database}.test_l2_2 ADD add_column DOUBLE;", "physical_table" : null, "technical_asset" : null, "business_asset" : null, "meta_data_link" : null, "data_quality" : null, "dlf_task" : null, "materialization" : null, "publish_to_dlm" : null, "biz_metric" : null, "summary_status" : null, "is_current_version" : false, "create_time" : "2024-04-11T10:33:07.565+08:00", "create_by" : "test_uesr" } } }
状态码: 400
{ "error_code" : "DS.60xx", "error_msg" : "The user request is illegal." }
状态码: 401
{ "error_code" : "DS.60xx", "error_msg" : "User authentication failed." }
状态码: 403
{ "error_code" : "DS.60xx", "error_msg" : "The user does not have permission to call this API." }
SDK代码示例
SDK代码示例如下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.dataartsstudio.v1.region.DataArtsStudioRegion; import com.huaweicloud.sdk.dataartsstudio.v1.*; import com.huaweicloud.sdk.dataartsstudio.v1.model.*; public class SearchDesignLatestApprovalDiffSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "{project_id}"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk); DataArtsStudioClient client = DataArtsStudioClient.newBuilder() .withCredential(auth) .withRegion(DataArtsStudioRegion.valueOf("<YOUR REGION>")) .build(); SearchDesignLatestApprovalDiffRequest request = new SearchDesignLatestApprovalDiffRequest(); request.withBizId("{biz_id}"); try { SearchDesignLatestApprovalDiffResponse response = client.searchDesignLatestApprovalDiff(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkdataartsstudio.v1.region.dataartsstudio_region import DataArtsStudioRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkdataartsstudio.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] projectId = "{project_id}" credentials = BasicCredentials(ak, sk, projectId) client = DataArtsStudioClient.new_builder() \ .with_credentials(credentials) \ .with_region(DataArtsStudioRegion.value_of("<YOUR REGION>")) \ .build() try: request = SearchDesignLatestApprovalDiffRequest() request.biz_id = "{biz_id}" response = client.search_design_latest_approval_diff(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dataartsstudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") projectId := "{project_id}" auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build() client := dataartsstudio.NewDataArtsStudioClient( dataartsstudio.DataArtsStudioClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.SearchDesignLatestApprovalDiffRequest{} request.BizId = "{biz_id}" response, err := client.SearchDesignLatestApprovalDiff(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。
状态码
状态码 |
描述 |
---|---|
200 |
Success,返回data数据是PublishVersionVO数组,以及总数。 |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |