指标列表查询树状结果
接口描述
本接口是用于获取树状结构的指标列表
接口URL
GET Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/metrics/treeList
anymetrics_host:anymetrics_port 获取方式请参考:调用方式
请求参数
公共请求参数(HEADERS)
| 参数 | 类型 | 是否必选 | 最大长度 | 描述 |
| tenant-id | String | 是 | 32 | 租户ID,用于指标查询内容所在的租户 |
| auth-type | String | 是 | 32 | 认证方式,用于设置身份认证方式 UID:使用 UID 进行身份认证TOKEN:使用 TOKEN 进行身份认证 |
| auth-value | String | 是 | 32 | UID或者TOKEN值,与auth-type 类型选择一致 |
公共参数获取方式
tenant-id 与 auth-value:在 Aloudata CAN 顶部导航栏选择指标应用,左边菜单栏选择 API 集成。在 API 集成界面获取取到tenant-id 与auth-value。

请求参数
无
响应参数
响应参数说明
| 参数 | 类型 | 是否必选 | 最大长度 | 描述 |
| categoryId | String | 是 | 当前目录id | |
| categoryName | String | 是 | 当前目录名称 | |
| metricList | Array | 否 | 当前目录下的指标列表。具体参数说明参见 4.2metricList 参数说明 | |
| subCategory | Array | 否 | 子目录列表,递归结构 |
metricList 参数说明
| 参数 | 类型 | 是否必选 | 最大长度 | 描述 | |
| code | String | 否 | 指标编码指标唯一标识,系统内部生成 |
||
| metricName | String | 是 | 128 | 指标名称 |
|
| version | Int | 否 | 指标版本 |
||
| metricCode | String | 是 | 指标编码 |
||
| metricDisplayName | String | 是 | 中文名 |
||
| businessCaliber | String | 是 | 业务口径 |
||
| owner | String | 是 | 指标负责人 |
||
| type | String | 是 | 指标类型 |
||
| unit | String | 是 | 指标单位 |
||
| metricViewCount | Integer | 是 | 指标查询次数 |
||
| status | String | 是 | 指标终态:枚举值如下:ONLINE:线上OOFLINE:线下 |
||
| publishStatus | String | 是 | 发布状态:枚举值如下:DRAFT:草稿PUBLISHED:已发布 |
||
| displayStatus | String | 否 | 指标状态指标当前所属状态,状态枚举值如下:UNPUBLISHED:未发布PUBLISHED:已发布SAVED_NOT_PUBLISHED:已保存未发布OFFLINE:已下线PENDING_PUBLISH:发布中PENDING_OFFLINE:下线中PENDING_DELETE:待删除 |
||
| properties | Map | 否 | 指标属性。具体参数说明参见 4.3properties 参数说明 |
properties
| 参数 | 类型 | 是否必选 | 最大长度 | 描述 |
| MANAGE | String | 否 | 128 | 管理属性 |
| BUSINESS | String | 否 | 业务属性 |
|
| TECHNOLOGY | String | 否 | 128 | 技术属性 |
| BASE | String | 否 | 300 | 基础属性 |
请求示例
响应示例
{
"data": {
"rootList": [
{
"categoryId": "cb26dc45-74b6-4724-8a61-b2c28bf03af1",
"categoryName": "新建类目0",
"metricList": [
{
"metricName": "count_express_no",
"metricDisplayName": "express_no计数",
"businessCaliber": "对tb_express的express_no进行计数",
"owner": null,
"businessOwner": "436474374799757312",
"type": "ATOMIC",
"unit": "OTHER",
"metricCategoryId": "cb26dc45-74b6-4724-8a61-b2c28bf03af1",
"metricViewCount": 0,
"status": "ONLINE",
"publishStatus": "PUBLISHED",
"properties": {
"MANAGE": {},
"BUSINESS": {},
"TECHNOLOGY": {},
"BASE": {
"metricLevel": "T4"
}
}
}
],
"subCategory": [
{
"categoryId": "00516287-ab4b-4040-817c-074ab790bdb3",
"categoryName": "新建类目1",
"metricList": [
{
"metricName": "sum_OnlineSalesKey",
"metricDisplayName": "OnlineSalesKey求和",
"businessCaliber": "对fact_tb1的OnlineSalesKey进行求和",
"owner": null,
"businessOwner": "436932989968977920",
"type": "ATOMIC",
"unit": "OTHER",
"metricCategoryId": "00516287-ab4b-4040-817c-074ab790bdb3",
"metricViewCount": 0,
"status": "ONLINE",
"publishStatus": "PUBLISHED",
"properties": {
"MANAGE": {
"sdfdfda": "rsdyfg",
"fsdfg": "hk",
"gfds": "rd"
},
"BUSINESS": {
"asd": "dsfg"
},
"TECHNOLOGY": {},
"BASE": {
"metricLevel": "T4"
}
}
}
],
"subCategory": []
}
]
},
{
"categoryId": "-1",
"categoryName": "uncategorized",
"metricList": [
{
"metricName": "sum_order_amt",
"metricDisplayName": "order_amt求和",
"businessCaliber": "对tb_order的order_amt进行求和",
"owner": null,
"businessOwner": "436474374799757312",
"type": "ATOMIC",
"unit": "OTHER",
"metricCategoryId": "-1",
"metricViewCount": 0,
"status": "ONLINE",
"publishStatus": "PUBLISHED",
"properties": {
"MANAGE": {},
"BUSINESS": {},
"TECHNOLOGY": {},
"BASE": {}
}
},
{
"metricName": "count_buyer_id",
"metricDisplayName": "buyer_id计数",
"businessCaliber": "对tb_order的buyer_id进行计数",
"owner": null,
"businessOwner": "436474374799757312",
"type": "ATOMIC",
"unit": "OTHER",
"metricCategoryId": "-1",
"metricViewCount": 0,
"status": "ONLINE",
"publishStatus": "PUBLISHED",
"properties": {
"MANAGE": {},
"BUSINESS": {},
"TECHNOLOGY": {},
"BASE": {}
}
},
{
"metricName": "tt",
"metricDisplayName": "非上海提取的销售总额dfss",
"businessCaliber": "[order_amt求和]-[上海地区order_amt求和]",
"owner": null,
"businessOwner": "436474374799757312",
"type": "COMPOSITE",
"unit": "OTHER",
"metricCategoryId": "-1",
"metricViewCount": 0,
"status": "ONLINE",
"publishStatus": "PUBLISHED",
"properties": {
"MANAGE": {},
"BUSINESS": {},
"TECHNOLOGY": {},
"BASE": {
"metricLevel": "T3"
}
}
},
{
"metricName": "order_amt_sum_shanghai",
"metricDisplayName": "上海地区order_amt求和",
"businessCaliber": "上海地区order_amt求和",
"owner": null,
"businessOwner": "436474374799757312",
"type": "DERIVED",
"unit": "OTHER",
"metricCategoryId": "-1",
"metricViewCount": 0,
"status": "ONLINE",
"publishStatus": "PUBLISHED",
"properties": {
"MANAGE": {},
"BUSINESS": {},
"TECHNOLOGY": {},
"BASE": {}
}
}
],
"subCategory": []
}
]
},
"success": true,
"code": null,
"errorMsg": null,
"traceId": "586b0dfd92d74ed3985025e7710043f7.200.17161729765280029"
}