获取原始数据表格
功能介绍
获取原始数据表格。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
POST /v1/apm2/openapi/view/metric/raw-table
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
从IAM服务获取的用户Token。 |
x-business-id |
是 |
Long |
应用id。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
last_row_id |
否 |
String |
上一次扫描的数据ID。 |
view_config |
是 |
RawTableView object |
原始数据表格视图。 |
page |
是 |
Integer |
当前页码。 |
page_size |
是 |
Integer |
每页数据总数。 |
order_by |
否 |
String |
排序。 |
search_word |
否 |
String |
搜索关键字。 |
instance_id |
否 |
Long |
实例id。 |
monitor_item_id |
否 |
Long |
监控项id。 |
env_id |
是 |
Long |
环境id。 |
start_time |
是 |
String |
开始时间。 |
end_time |
是 |
String |
结束时间。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
view_type |
否 |
String |
视图类型。 枚举值:
|
collector_name |
是 |
String |
采集器名称。 |
metric_set |
是 |
String |
视图对应的指标集的名称。 |
title |
是 |
String |
图标所需展示的标题。 |
table_direction |
是 |
String |
表格的方向,H:默认,表头横向,V:表头纵向。 枚举值:
|
group_by |
是 |
String |
分组规则。 |
filter |
是 |
String |
过滤列表模型。 |
field_item_list |
是 |
Array of FieldItem objects |
所需展示的字段列表模型集合。 |
span |
是 |
Boolean |
跨度。 |
span_field |
是 |
String |
跨度字段。 |
order_by |
否 |
String |
排序规则。 |
latest |
否 |
Boolean |
是否只展示最近一笔数据。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
row_list |
Array of FrontRow objects |
数据行。 |
latest_data_Time |
String |
最近一笔数据的时间。 |
table_direction |
String |
表格的方向,H:默认,表头横向,V:表头纵向。 枚举值:
|
result_id |
String |
上次请求id。 |
real_start_time |
Long |
实际开始的时间,主要用于下一次调用,特别是分页调用的时候传的参数。 |
real_end_time |
Long |
实际结束的时间。 |
参数 |
参数类型 |
描述 |
---|---|---|
cell_list |
Array of FrontCell objects |
数据单元集合。 |
filter |
String |
将group by的字段拼接成过滤字符串,用于后续点网格单击使用。 |
header |
Boolean |
是否是header信息。 |
tx_id |
Long |
Url跟踪id。 |
请求示例
入参为view_type参数为rawtable的视图配置,可从查询监控项配置信息接口获取。
/v1/apm2/openapi/view/metric/raw-table
{
"end_time" : 1667436600000,
"env_id" : "913",
"instance_id" : "13",
"monitor_item_id" : 10499,
"page" : 1,
"page_size" : 10,
"search_word" : "",
"start_time" : 1667435400000,
"view_config" : {
"span" : null,
"latest" : null,
"collector_name" : "Exception",
"metric_set" : "exception",
"title" : "异常堆栈",
"table_direction" : null,
"group_by" : "",
"filter" : "className=com.*.*.*.*.apm.alarm.service.impl.AviatorService^exceptionType=java.lang.ClassCastException^logType=sl4j_logback_error",
"field_item_list" : [ {
"trace" : null,
"function" : "stackTrace",
"as" : "异常堆栈",
"default_value" : null,
"precision" : null,
"unit" : null,
"visible" : true
} ],
"span_field" : null,
"view_type" : "rawtable"
}
}
响应示例
状态码: 200
OK,请求响应成功。
{
"row_list" : [ {
"header" : true,
"cell_list" : [ {
"span" : null,
"trace" : null,
"data_type" : "STRING",
"function" : null,
"span_field" : null,
"precision" : null,
"text" : "time",
"unit" : null,
"visible" : true
}, {
"span" : null,
"trace" : null,
"data_type" : "CLOB",
"function" : null,
"span_field" : null,
"precision" : null,
"text" : "异常堆栈",
"unit" : null,
"visible" : true
} ],
"filter" : null,
"tx_id" : null
}, {
"header" : null,
"cell_list" : [ {
"span" : null,
"trace" : null,
"data_type" : null,
"function" : null,
"span_field" : null,
"precision" : null,
"text" : "2022-11-03 08:41:00",
"unit" : null,
"visible" : true
}, {
"span" : null,
"trace" : null,
"data_type" : null,
"function" : null,
"span_field" : null,
"precision" : null,
"text" : "6-973f4c1c78928bcf67d67dfaccc9d3a09f3cef97b2de70bd11f103a1af449b94",
"unit" : null,
"visible" : true
} ],
"filter" : null,
"tx_id" : null
} ],
"latest_data_Time" : "2022-11-03 08:41:00",
"table_direction" : "H",
"result_id" : null,
"real_start_time" : 1667435400000,
"real_end_time" : 1667436600000
}
状态码
状态码 |
描述 |
---|---|
200 |
OK,请求响应成功。 |
400 |
Bad Request,语义或参数有误。 |
401 |
Unauthorized,没有权限。 |
403 |
Forbidden,禁止访问。 |
404 |
Not Found,没有找到要请求的资源。 |
错误码
请参见错误码。