查找业务限定
功能介绍
通过中英文名称、描述、创建者、审核人、限定分组id、修改时间状态分页查找限定信息。
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/design/conditions
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID,获取方法请参见项目ID和账号ID。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
name |
否 |
String |
按名称或编码模糊查询。 |
create_by |
否 |
String |
按创建者查询。 |
approver |
否 |
String |
按审核人查询。 |
status |
否 |
String |
业务状态。 枚举值:
|
begin_time |
否 |
String |
时间过滤左边界,与end_time一起使用,只支持时间范围过滤,单边过滤无效。格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
end_time |
否 |
String |
时间过滤右边界,与begin_time一起使用只支持时间范围过滤,单边过滤无效。格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
limit |
否 |
Integer |
每页查询条数,即查询Y条数据。默认值50,取值范围[1,100]。 |
offset |
否 |
Integer |
查询起始坐标,即跳过X条数据,仅支持0或limit的整数倍,不满足则向下取整,默认值0。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
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 |
data,统一的返回结果的最外层数据结构。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
编码,ID字符串。 |
name_en |
String |
字段名 |
name_ch |
String |
业务属性。 |
description |
String |
描述。 |
create_by |
String |
创建人。 |
condition_fn |
String |
限定计算方法。 枚举值:
|
condition_fn_param |
String |
限定计算参数。 |
status |
String |
实体的发布状态,只读,创建和更新时无需填写。 枚举值:
|
create_time |
String |
创建时间,只读,格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
update_time |
String |
更新时间,只读,格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
approval_info |
ApprovalVO object |
审批信息,只读参数。业务对象最近一次的审批信息,包括审批的业务详情、审核人信息、审核时间等。 |
new_biz |
BizVersionManageVO object |
业务版本管理,只读。 |
base_time |
Integer |
基准时间。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
审批单ID,ID字符串。 |
tenant_id |
String |
项目ID,获取方式参考接口路径参数“project_id”。 |
name_ch |
String |
业务中文名。 |
name_en |
String |
业务英文名。 |
biz_id |
String |
业务ID,ID字符串。 |
biz_type |
String |
业务实体类型。 枚举值:
|
biz_info |
String |
序列化之后的业务详情,类型是string。 |
biz_info_obj |
Object |
业务详情,类型是object。 |
biz_version |
Integer |
业务版本。 |
biz_status |
String |
实体的发布状态,只读,创建和更新时无需填写。 枚举值:
|
approval_status |
String |
业务审批状态,只读。 枚举值:
|
approval_type |
String |
业务审核类型。 枚举值:
|
submit_time |
String |
提交时间。 |
create_by |
String |
创建者。 |
l1 |
String |
主题域分组中文名,只读,创建和更新时无需填写。 |
l2 |
String |
主题域中文名,只读,创建和更新时无需填写。 |
l3 |
String |
业务对象中文名,只读,创建和更新时无需填写。 |
approval_time |
String |
审核时间。 |
approver |
String |
审核人。 |
|
String |
审核人邮箱。 |
msg |
String |
审核信息。 |
directory_path |
String |
目录树。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
ID信息,ID字符串。 |
biz_type |
String |
业务实体类型。 枚举值:
|
biz_id |
String |
业务ID,ID字符串。 |
biz_info |
String |
业务对象信息。 |
status |
String |
实体的发布状态,只读,创建和更新时无需填写。 枚举值:
|
biz_version |
Integer |
业务版本,只读。 |
create_time |
String |
创建时间,只读,格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
update_time |
String |
更新时间,只读,格式遵循RFC3339,精确到秒,UTC时区,即yyyy-mm-ddTHH:MM:SSZ,如1970-01-01T00:00:00Z。 |
状态码: 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 |
返回的数据信息。 |
请求示例
查找时间限定信息。
GET https://{endpoint}/v2/{project_id}/design/conditions?condition_type=TIME_CONDITION
响应示例
状态码: 200
Success,返回data数据是ConditionVO数组,以及总数。
{ "data" : { "value" : { "total" : 29, "records" : [ { "id" : "1204396387974955008", "name_en" : "last_month", "name_ch" : "前一月", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_MONTH", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2024-02-06T12:01:15+08:00", "update_time" : "2024-03-07T18:01:43+08:00", "approval_info" : { "id" : "1215358735950708736", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1204396387974955008", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2024-03-07T18:01:43+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2024-03-07T18:01:43+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK.", "directory_path" : null }, "new_biz" : null, "base_time" : 1 }, { "id" : "1167067126117302272", "name_en" : "t003", "name_ch" : "t003", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-10-26T11:48:06+08:00", "update_time" : "2023-11-09T13:36:28+08:00", "approval_info" : { "id" : "1172167829596860416", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1167067126117302272", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-11-09T13:36:28+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-11-09T13:36:28+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK. (Associated Publish By t003, Automatic Approval.)", "directory_path" : null }, "new_biz" : null, "base_time" : null }, { "id" : "1163941657377488896", "name_en" : "t002", "name_ch" : "t002", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-10-17T20:48:36+08:00", "update_time" : "2023-10-18T13:57:14+08:00", "approval_info" : { "id" : "1163941893843959808", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1163941657377488896", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-10-17T20:49:32+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-10-17T21:20:02+08:00", "approver" : "test_uesr", "email" : null, "msg" : "1", "directory_path" : null }, "new_biz" : { "id" : null, "biz_type" : "TIME_CONDITION", "biz_id" : "1163941657377488896", "biz_info" : "{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"0833a573fe80d5401f6dc010a775569a\",\"updateBy\":\"0833a573fe80d5401f6dc010a775569a\",\"createTime\":1697546916000,\"updateTime\":1698292074309,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1163941657377488896\",\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"nameCh\":\"t002\",\"nameEn\":\"t002\",\"description\":\"\",\"conditionFn\":\"LAST_YEAR\",\"calExp\":null,\"conditionFnParam\":\"0\",\"status\":\"PUBLISHED\",\"enableFlag\":true,\"nameTranslate\":null,\"descriptionTranslate\":null,\"baseTime\":null,\"lastL2Id\":null}", "status" : "DRAFT", "biz_version" : 0, "create_time" : "2023-10-26T11:47:54+08:00", "update_time" : "2023-10-26T11:47:54+08:00" }, "base_time" : null }, { "id" : "1163941632085835776", "name_en" : "t001", "name_ch" : "t001", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "OFFLINE", "create_time" : "2023-10-17T20:48:30+08:00", "update_time" : "2023-10-24T20:15:22+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1163884268984922112", "name_en" : "sj1017", "name_ch" : "sj1017", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-10-17T17:00:34+08:00", "update_time" : "2023-10-30T16:37:42+08:00", "approval_info" : { "id" : "1163926109700734976", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1163884268984922112", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-10-17T19:46:49+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-10-17T19:50:00+08:00", "approver" : "test_uesr", "email" : null, "msg" : "ok", "directory_path" : null }, "new_biz" : null, "base_time" : null }, { "id" : "1155167466507448320", "name_en" : "lix", "name_ch" : "lix", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_MONTH", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-09-23T15:43:06+08:00", "update_time" : "2023-10-17T20:46:11+08:00", "approval_info" : { "id" : "1155919632490725376", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1155167466507448320", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-09-25T17:31:56+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-09-25T17:31:56+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK. (Associated Publish By lix, Automatic Approval.)", "directory_path" : null }, "new_biz" : { "id" : null, "biz_type" : "TIME_CONDITION", "biz_id" : "1155167466507448320", "biz_info" : "{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"0833a573fe80d5401f6dc010a775569a\",\"updateBy\":\"0833a573fe80d5401f6dc010a775569a\",\"createTime\":1695454986000,\"updateTime\":1698149390708,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1155167466507448320\",\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"nameCh\":\"lix\",\"nameEn\":\"lix\",\"description\":\"\",\"conditionFn\":\"LAST_MONTH\",\"calExp\":null,\"conditionFnParam\":\"0\",\"status\":\"PUBLISHED\",\"enableFlag\":true,\"nameTranslate\":null,\"descriptionTranslate\":null,\"baseTime\":2,\"lastL2Id\":null}", "status" : "DRAFT", "biz_version" : 0, "create_time" : "2023-10-24T20:09:51+08:00", "update_time" : "2023-10-24T20:09:51+08:00" }, "base_time" : 2 }, { "id" : "1154507394794024960", "name_en" : "oi11", "name_ch" : "oi11", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-09-21T20:00:13+08:00", "update_time" : "2023-10-17T16:54:20+08:00", "approval_info" : { "id" : "1163882705348386816", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1154507394794024960", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-10-17T16:54:21+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-10-17T16:54:20+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK.", "directory_path" : null }, "new_biz" : null, "base_time" : null }, { "id" : "1154507340083523584", "name_en" : "lxy0101", "name_ch" : "lxy0101", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-09-21T20:00:00+08:00", "update_time" : "2023-10-30T16:37:06+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1150823722467344384", "name_en" : "current_month", "name_ch" : "当前月", "description" : "", "create_by" : "test_uesr", "condition_fn" : "CURRENT_MONTH", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-09-11T16:02:37+08:00", "update_time" : "2023-09-11T16:02:37+08:00", "approval_info" : { "id" : "1150823723427840000", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1150823722467344384", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-09-11T16:02:37+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-09-11T16:02:37+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK.", "directory_path" : null }, "new_biz" : null, "base_time" : 1 }, { "id" : "1128840997309136896", "name_en" : "aa", "name_ch" : "a", "description" : "", "create_by" : "test_uesr", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-1,1", "status" : "REJECT", "create_time" : "2023-07-13T00:11:07+08:00", "update_time" : "2024-02-27T21:44:53+08:00", "approval_info" : { "id" : "1200506282973483008", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1128840997309136896", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "REJECT", "approval_status" : "REJECT", "approval_type" : null, "submit_time" : "2024-01-26T18:23:22+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2024-02-27T21:44:53+08:00", "approver" : "test_uesr", "email" : null, "msg" : "no", "directory_path" : null }, "new_biz" : null, "base_time" : 1 }, { "id" : "1128832688892035072", "name_en" : "last_year", "name_ch" : "前一年", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "PUBLISHED", "create_time" : "2023-07-12T23:38:06+08:00", "update_time" : "2023-07-12T23:38:11+08:00", "approval_info" : { "id" : "1128832714003333120", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1128832688892035072", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-07-12T23:38:12+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-07-12T23:38:11+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK.", "directory_path" : null }, "new_biz" : null, "base_time" : null }, { "id" : "1128831725523312640", "name_en" : "bbbbb", "name_ch" : "bbb", "description" : "", "create_by" : "test_uesr", "condition_fn" : "LAST_YEAR", "condition_fn_param" : "0", "status" : "DRAFT", "create_time" : "2023-07-12T23:34:16+08:00", "update_time" : "2023-07-12T23:34:16+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1128831552864788480", "name_en" : "aaa", "name_ch" : "aaa", "description" : "", "create_by" : "test_uesr", "condition_fn" : "CURRENT_YEAR", "condition_fn_param" : "0", "status" : "DRAFT", "create_time" : "2023-07-12T23:33:35+08:00", "update_time" : "2023-07-12T23:34:33+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1109414797142806528", "name_en" : "1m_year_on_year", "name_ch" : "最近30天_去年同期", "description" : "", "create_by" : "test_uesr", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-395,-365", "status" : "PUBLISHED", "create_time" : "2023-05-20T09:38:20+08:00", "update_time" : "2023-05-20T09:38:19+08:00", "approval_info" : { "id" : "1109414797620957184", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1109414797142806528", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-05-20T09:38:20+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-05-20T09:38:19+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK.", "directory_path" : null }, "new_biz" : { "id" : null, "biz_type" : "TIME_CONDITION", "biz_id" : "1109414797142806528", "biz_info" : "{\"versionName\":null,\"versionTag\":null,\"versionId\":null,\"createBy\":\"0833a573fe80d5401f6dc010a775569a\",\"updateBy\":null,\"createTime\":1684546700000,\"updateTime\":1684546699000,\"l3Id\":null,\"l2Id\":null,\"alias\":null,\"encoding\":null,\"prefix\":null,\"codeNum\":null,\"id\":\"1109414797142806528\",\"tenantId\":\"0833a5737480d53b2f25c010dc1a7b88-workspace-eeb055e69c624311b6b9cfee89a4ec70\",\"nameCh\":\"最近30天_去年同期\",\"nameEn\":\"1m_year_on_year\",\"description\":\"\",\"conditionFn\":\"BETWEEN_DAY\",\"calExp\":null,\"conditionFnParam\":\"-395,-365\",\"status\":\"PUBLISHED\",\"enableFlag\":true,\"nameTranslate\":null,\"descriptionTranslate\":null,\"baseTime\":null,\"lastL2Id\":null}", "status" : "DRAFT", "biz_version" : 0, "create_time" : "2023-06-01T14:17:10+08:00", "update_time" : "2023-06-01T14:17:10+08:00" }, "base_time" : null }, { "id" : "1109414655866064896", "name_en" : "1m_prior_period", "name_ch" : "最近30天_上期", "description" : "", "create_by" : "test_uesr", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-60,-30", "status" : "PUBLISHED", "create_time" : "2023-05-20T09:37:46+08:00", "update_time" : "2023-05-20T09:37:46+08:00", "approval_info" : { "id" : "1109414656310661120", "tenant_id" : null, "name_ch" : null, "name_en" : null, "biz_id" : "1109414655866064896", "biz_type" : null, "biz_info" : null, "biz_info_obj" : null, "biz_version" : 0, "biz_status" : "PUBLISHED", "approval_status" : "APPROVED", "approval_type" : null, "submit_time" : "2023-05-20T09:37:46+08:00", "create_by" : null, "l1" : null, "l2" : null, "l3" : null, "approval_time" : "2023-05-20T09:37:46+08:00", "approver" : "test_uesr", "email" : null, "msg" : "Fast Approval OK.", "directory_path" : null }, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812749", "name_en" : "f4w", "name_ch" : "未来4周", "description" : "历史数据的每天平均值*7*4", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "1,28", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812748", "name_en" : "f1w", "name_ch" : "未来7天", "description" : "历史数据的每天平均值*7", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "1,7", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812747", "name_en" : "1h", "name_ch" : "最近1小时", "description" : "上一个小时的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_HOUR", "condition_fn_param" : "-1,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812746", "name_en" : "td", "name_ch" : "截止当日", "description" : "截止计算日期(包括)的所有数据(近10年内)", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-3650,0", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812745", "name_en" : "b30d", "name_ch" : "30天前的一天", "description" : "往前第31天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-31,-30", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812744", "name_en" : "bh", "name_ch" : "180天以前所有", "description" : "截止180天前(往前第181天)的所有数据(近10年内),before half-year", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-3650,-181", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812743", "name_en" : "6m", "name_ch" : "最近180天", "description" : "截止昨天共180天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-180,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812742", "name_en" : "3m", "name_ch" : "最近90天", "description" : "截止昨天共90天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-90,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812741", "name_en" : "2m", "name_ch" : "最近60天", "description" : "截止昨天共60天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-60,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812740", "name_en" : "1m", "name_ch" : "最近30天", "description" : "截止昨天共30天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-30,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812739", "name_en" : "2w", "name_ch" : "最近14天", "description" : "截止昨天共14天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-14,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812738", "name_en" : "1w", "name_ch" : "最近7天", "description" : "截止昨天共7天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-7,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812737", "name_en" : "3d", "name_ch" : "最近3天", "description" : "截止昨天共3天的数据", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-3,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null }, { "id" : "1013133487357812736", "name_en" : "1d", "name_ch" : "最近1天", "description" : "昨天的值", "create_by" : "SYSTEM", "condition_fn" : "BETWEEN_DAY", "condition_fn_param" : "-1,-1", "status" : "PUBLISHED", "create_time" : "2022-08-27T17:10:46+08:00", "update_time" : "2022-08-27T17:10:46+08:00", "approval_info" : null, "new_biz" : null, "base_time" : null } ] } } }
状态码: 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 |
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 ListConditionSolution { 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(); ListConditionRequest request = new ListConditionRequest(); try { ListConditionResponse response = client.listCondition(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 |
# 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 = ListConditionRequest() response = client.list_condition(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 |
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.ListConditionRequest{} response, err := client.ListCondition(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。
状态码
状态码 |
描述 |
---|---|
200 |
Success,返回data数据是ConditionVO数组,以及总数。 |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |