Help Center/ Application Performance Management/ API Reference(2.0)/ APIs/ VIEW/ Querying Monitoring Item Configurations
Updated on 2023-08-02 GMT+08:00

Querying Monitoring Item Configurations

Function

This API is used to query monitoring item configurations.

URI

GET /v1/apm2/openapi/view/config/get-monitor-item-view-config

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

env_id

Yes

Long

Environment ID.

collector_id

Yes

Long

Collector ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

x-business-id

Yes

Long

Application ID.

X-Auth-Token

Yes

String

User token obtained from IAM.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

title

String

Title.

collector_name

String

Collector name.

view_row_list

Array of ViewRow objects

List of views. Each list represents a list of views.

style

String

Type.

Table 4 ViewRow

Parameter

Type

Description

view_list

Array of ViewBase objects

View list, which contains multiple views. Views are adapted based on their actual lengths.

title

String

Title.

Table 5 ViewBase

Parameter

Type

Description

collector_name

String

Collector name.

metric_set

String

Name of the metric set corresponding to the view.

title

String

Title to be displayed.

table_direction

String

Direction of the table heading. Options: H (default): horizontal. V: vertical.

Enumeration values:

  • H
  • V

group_by

String

Grouping rule.

filter

String

Filter list model.

field_item_list

Array of FieldItem objects

Field list models to be displayed.

span

Boolean

Span information.

span_field

String

Attribute of the span field.

order_by

String

Sorting rule.

latest

String

Whether to display only the latest data.

view_type

String

View type.

Enumeration values:

  • trend
  • sumtable
  • rawtable
Table 6 FieldItem

Parameter

Type

Description

function

String

Expression.

as

String

As.

default_value

String

Default value.

trace

Boolean

Trace or not.

precision

Integer

Percentage.

unit

String

Unit.

visible

Boolean

Visible or not.

Example Requests

Query the configuration of the monitoring item whose environment ID is 11 and collector ID is 50.

/v1/apm2/openapi/view/config/get-monitor-item-view-config?env_id=11&collector_id=50

Example Responses

Status code: 200

OK: The request is successful.

{
  "title" : "Url",
  "collector_name" : "Url",
  "view_row_list" : [ {
    "view_list" : [ {
      "latest" : null,
      "span" : true,
      "collector_name" : "Url",
      "metric_set" : "url",
      "title" : "URL Summary",
      "table_direction" : null,
      "group_by" : "url,method",
      "filter" : "",
      "field_item_list" : [ {
        "trace" : null,
        "function" : "SUM(invokeCount)",
        "as" : "Number of calls",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(totalTime)/SUM(invokeCount)",
        "as" : "Average response time (ms)",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(errorCount)",
        "as" : "Number of errors",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "MAX(concurrentMax)",
        "as" : "Maximum concurrency",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "MAX(maxTime)",
        "as" : "Maximum response time (ms)",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(range1)",
        "as" : "0ms-10ms",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : false
      }, {
        "trace" : null,
        "function" : "SUM(range2)",
        "as" : "10ms-100ms",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : false
      }, {
        "trace" : null,
        "function" : "SUM(range3)",
        "as" : "100ms-500ms",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : false
      }, {
        "trace" : null,
        "function" : "SUM(range4)",
        "as" : "500ms-1s",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : false
      }, {
        "trace" : null,
        "function" : "SUM(range5)",
        "as" : "1s-10s",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : false
      }, {
        "trace" : null,
        "function" : "SUM(range6)",
        "as" : "10s-n",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : false
      } ],
      "span_field" : "source",
      "order_by" : null,
      "view_type" : "sumtable"
    } ],
    "title" : ""
  }, {
    "view_list" : [ {
      "latest" : null,
      "span" : true,
      "collector_name" : "Url",
      "metric_set" : "statuscode",
      "title" : "Status Code Summary",
      "table_direction" : null,
      "group_by" : "code",
      "filter" : "",
      "field_item_list" : [ {
        "trace" : null,
        "function" : "SUM(count)",
        "as" : "Count",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "LAST(url)",
        "as" : "Latest URL",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      } ],
      "span_field" : "code",
      "order_by" : null,
      "view_type" : "sumtable"
    } ],
    "title" : ""
  }, {
    "view_list" : [ {
      "latest" : null,
      "span" : null,
      "collector_name" : "Url",
      "metric_set" : "user",
      "title" : "Cluster Summary",
      "table_direction" : null,
      "group_by" : "clusterId",
      "filter" : "",
      "field_item_list" : [ {
        "trace" : null,
        "function" : "SUM(invokeCount)",
        "as" : "Number of calls",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(totalTime)/SUM(invokeCount)",
        "as" : "Average response time (ms)",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(errorCount)",
        "as" : "Number of errors",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      } ],
      "span_field" : null,
      "order_by" : null,
      "view_type" : "sumtable"
    } ],
    "title" : ""
  }, {
    "view_list" : [ {
      "latest" : null,
      "span" : null,
      "collector_name" : "Url",
      "metric_set" : "total",
      "title" : "Dashboard",
      "table_direction" : null,
      "group_by" : "",
      "filter" : "",
      "field_item_list" : [ {
        "trace" : null,
        "function" : "SUM(invokeCount)",
        "as" : "Total number of requests",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(totalTime)/SUM(invokeCount)",
        "as" : "Average response time (ms)",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      }, {
        "trace" : null,
        "function" : "SUM(errorCount)",
        "as" : "Number of errors",
        "default_value" : null,
        "precision" : null,
        "unit" : null,
        "visible" : true
      } ],
      "span_field" : null,
      "order_by" : null,
      "view_type" : "trend"
    } ],
    "title" : ""
  } ],
  "style" : "tab"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

401

Unauthorized: No permissions.

403

Forbidden: Access forbidden.

404

Not Found: The requested resource is not found.

Error Codes

See Error Codes.