Updated on 2023-08-02 GMT+08:00

Querying the Monitoring Item List

Function

This API is used to query the monitoring item list.

URI

POST /v1/apm2/openapi/apm-service/monitor-item-mgr/get-env-monitor-item-list

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

x-business-id

Yes

Long

Application ID.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

env_id

Yes

Long

Environment ID.

page

Yes

Integer

Page number.

page_size

Yes

Integer

Number of records on each page.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

monitor_item_list

Array of MonitorItem objects

Monitoring item list.

total_count

Integer

Total number.

totalPage

Integer

Total number of pages.

Table 4 MonitorItem

Parameter

Type

Description

id

Long

Monitoring item ID.

env_id

Long

Environment ID.

collector_id

Integer

Collector ID.

collector_name

String

Collector name.

display_name

String

Display name of the collector.

collect_interval

Integer

Collection interval.

disabled

Boolean

Disable or not.

status_change_user_id

String

ID of the user who changed the collection status.

status_change_user_name

String

Name of the user who changed the collection status.

status_change_time

String

Time when the collection status was changed.

config_change_user_id

String

ID of the user who changed the collection configuration.

config_change_user_name

String

Name of the user who changed the collection configuration.

config_change_time

String

Time when the collection configuration was changed.

Example Requests

Query the monitoring item list of environment 913.

/v1/apm2/openapi/apm-service/monitor-item-mgr/get-env-monitor-item-list

{
  "env_id" : "913",
  "page" : 1,
  "page_size" : 10
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "monitor_item_list" : [ {
    "id" : 55150,
    "env_id" : 913,
    "collector_id" : 61,
    "collector_name" : "Thread",
    "display_name" : "Thread",
    "collect_interval" : 60,
    "disabled" : false,
    "status_change_user_id" : null,
    "status_change_user_name" : null,
    "status_change_time" : null,
    "config_change_user_id" : null,
    "config_change_user_name" : null,
    "config_change_time" : "2022-05-28 20:35:13"
  }, {
    "id" : 10509,
    "env_id" : 913,
    "collector_id" : 19,
    "collector_name" : "KafkaConsumer",
    "display_name" : "Kafka Consumer",
    "collect_interval" : 60,
    "disabled" : false,
    "status_change_user_id" : null,
    "status_change_user_name" : null,
    "status_change_time" : null,
    "config_change_user_id" : null,
    "config_change_user_name" : null,
    "config_change_time" : "2021-10-20 15:06:51"
  } ],
  "total_count" : 2,
  "total_page" : 1
}

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.