应用性能管理 APM-获取趋势图:请求示例

时间:2023-11-21 15:45:54

请求示例

获取趋势图。入参中,view_type对应的值是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" : "调用次数",
    "table_direction" : null,
    "group_by" : "",
    "filter" : "url=/apm2/health/v1/health-check^method=GET",
    "field_item_list" : [ {
      "trace" : null,
      "function" : "SUM(invokeCount)",
      "as" : "调用次数",
      "default_value" : null,
      "precision" : null,
      "unit" : null,
      "visible" : true
    } ],
    "span_field" : "source",
    "view_type" : "trend"
  }
}
support.huaweicloud.com/api-apm/ShowTrend.html