Obtaining the Trend Graph
Function
This API is used to obtain the trend graph.
URI
POST /v1/apm2/openapi/view/metric/trend
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
x-business-id | Yes | Long | Application ID. |
X-Auth-Token | Yes | String | User token obtained from IAM. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
view_config | No | TrendView object | View configuration information. |
instance_id | No | Long | Instance ID. |
monitor_item_id | No | Long | Monitoring item ID. |
env_id | No | Long | Environment ID. |
start_time | No | String | Start time. |
end_time | No | String | End time. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
view_type | No | String | View type. Enumeration values:
|
collector_name | No | String | Collector name. |
metric_set | No | String | Name of the metric set corresponding to the view. |
title | No | 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 | Group. |
filter | No | String | Filter list model. |
field_item_list | No | Array of FieldItem objects | Field list models to be displayed. |
span | No | Boolean | Span. |
span_field | No | String | Attribute of the span field. |
order_by | No | String | Sorting order. |
latest | No | String | 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 |
---|---|---|
line_list | Array of FrontLine objects | Trend graph data list. |
latest_data_Time | Long | Last date and time. |
Parameter | Type | Description |
---|---|---|
point_list | Array of FrontPoint objects | Data point set. |
title | String | Title. |
unit | String | Unit. |
precision | Integer | Percentage. |
data_type | String | Date. |
visible | Boolean | Visible or not. |
Parameter | Type | Description |
---|---|---|
time | Long | Time. |
value | Object | Value. |
Example Requests
Obtain the trend graph. Input parameter view_type is set to trend.
/v1/apm2/openapi/view/metric/trend{"end_time" : "2022-10-25 15:40:00","env_id" : "11","monitor_item_id" : 78,"start_time" : "2022-10-25 15:20:00","view_config" : {"latest" : null,"span" : true,"collector_name" : "Url","metric_set" : "url","title" : "Calls","table_direction" : null,"group_by" : "","filter" : "url=/apm2/health/v1/health-check^method=GET","field_item_list" : [ {"trace" : null,"function" : "SUM(invokeCount)","as" : "Calls","default_value" : null,"precision" : null,"unit" : null,"visible" : true} ],"span_field" : "source","view_type" : "trend"}}
Example Responses
None
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