Obtaining the Raw Data Table
Function
This API is used to obtain the raw data table.
URI
POST /v1/apm2/openapi/view/metric/raw-table
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token obtained from IAM. |
x-business-id | Yes | Long | Application ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
last_row_id | No | String | ID of the data scanned last time. |
view_config | Yes | RawTableView object | Raw data table view. |
page | Yes | Integer | Current page number. |
page_size | Yes | Integer | Number of data records on each page. |
order_by | No | String | Sorting order. |
search_word | No | String | Search keyword. |
instance_id | No | Long | Instance ID. |
monitor_item_id | No | Long | Monitoring item ID. |
env_id | Yes | Long | Environment ID. |
start_time | Yes | String | Start time. |
end_time | Yes | String | End time. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
view_type | Yes | String | View type. Enumeration values:
|
collector_name | Yes | String | Collector name. |
metric_set | Yes | String | Name of the metric set corresponding to the view. |
title | Yes | String | Title to be displayed. |
table_direction | No | String | Direction of the table heading. Options: H (default): horizontal. V: vertical. Enumeration values:
|
group_by | No | String | Grouping rule. |
filter | Yes | String | Filter list model. |
field_item_list | Yes | Array of FieldItem objects | Field list models to be displayed. |
span | Yes | Boolean | Span. |
span_field | Yes | String | Span field. |
order_by | No | String | Sorting rule. |
latest | No | Boolean | Whether to display only the latest data. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
function | No | String | Expression. |
as | No | String | As. |
default_value | No | String | Default value. |
trace | No | Boolean | Trace or not. |
precision | No | Integer | Percentage. |
unit | No | String | Unit. |
visible | No | Boolean | Visible or not. |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
row_list | Array of FrontRow objects | Data row. |
latest_data_Time | String | Time when the latest data record was generated. |
table_direction | String | Direction of the table heading. Options: H (default): horizontal. V: vertical. Enumeration values:
|
result_id | String | ID of the last request. |
real_start_time | Long | Actual start time, which is used for the next invocation. It must be transferred during pagination query. |
real_end_time | Long | Actual end time. |
Parameter | Type | Description |
---|---|---|
cell_list | Array of FrontCell objects | Data unit set. |
filter | String | "Group by" fields concatenated for subsequent query. |
header | Boolean | Whether the information is about the header. |
tx_id | Long | URL trace ID. |
Parameter | Type | Description |
---|---|---|
data_type | String | Data type. |
function | String | Function. |
trace | Boolean | Trace or not. |
span | Boolean | Whether the information is related to spans. If yes, you will be redirected to the trace search page. |
span_field | String | Span field. |
precision | Integer | Number of decimal places. |
text | String | Text information. |
unit | String | Unit. |
visible | Boolean | Visible or not. |
Example Requests
The input parameter is view_type (whose value is rawtable), which can be obtained by calling the API used to query monitoring item configurations.
/v1/apm2/openapi/view/metric/raw-table{"end_time" : 1667436600000,"env_id" : "913","monitor_item_id" : 10499,"page" : 1,"page_size" : 10,"start_time" : 1667435400000,"view_config" : {"span" : null,"latest" : null,"collector_name" : "Exception","metric_set" : "exception","title" : "Error Stack","table_direction" : null,"group_by" : "","filter" : "className=com.******.lubanops.apm.alarm.service.impl.AviatorService^exceptionType=java.lang.ClassCastException^logType=sl4j_logback_error","field_item_list" : [ {"trace" : null,"function" : "stackTrace","as" : "Error Stack","default_value" : null,"precision" : null,"unit" : null,"visible" : true} ],"span_field" : null,"view_type" : "rawtable"}}
Example Responses
Status code: 200
OK: The request is successful.
{"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" : "Error Stack","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}
Status Codes
Status Code | Description |
---|---|
200 | OK: The request is successful. |
400 | Bad Request: Semantic or parameter error. |
401 | Unauthorized: No permissions. |
403 | Forbidden: Access forbidden. |
404 | Not Found: The requested resource is not found. |
Error Codes
See Error Codes.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Requests
- Example Responses
- Status Codes
- Error Codes