nav-img
Advanced

Querying the Alarm Message List

Function

Query the trigger details and history of an alarm.

URI

POST /v1/apm2/openapi/alarm/data/get-alarm-notify-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, which is used for authentication.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

page

No

Integer

Page number.

page_size

No

Integer

Number of records on each page.

alarm_data_id

Yes

Integer

Alarm event ID.

region

Yes

String

Region name.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

front_alarm_notify_results

Array of FrontAlarmNotifyResult objects

Alarm notification list.

total_count

Integer

Total number of messages.

Table 4 FrontAlarmNotifyResult

Parameter

Type

Description

id

Long

Alarm notification ID.

gmt_create

String

Creation time.

notify_type

String

Notification type.

alarm_rule_id

Long

Alarm rule ID.

template_id

Long

Template ID.

alarm_data_event_id

Long

Associated event ID.

notify_status

Boolean

Notification result.

alarm_content

String

Notification content.

Example Requests

Query the trigger details and history of alarm event 42 in region .

/v1/apm2/openapi/alarm/data/get-alarm-notify-list
{
"alarm_data_id" : 42,
"region" : "",
"page" : 1,
"page_size" : 10
}

Example Responses

Status code: 200

OK: The request is successful.

{
"front_alarm_notify_results" : [ {
"id" : 1741,
"gmt_create" : "2022-10-09 22:58:27",
"notify_type" : "RECOVER",
"alarm_rule_id" : 3,
"template_id" : 2,
"alarm_data_event_id" : 42,
"notify_status" : false,
"alarm_content" : "The CPU usage is 0.017."
}, {
"id" : 1735,
"gmt_create" : "2022-10-09 22:58:26",
"notify_type" : "RECOVER",
"alarm_rule_id" : 3,
"template_id" : 2,
"alarm_data_event_id" : 42,
"notify_status" : false,
"alarm_content" : "The CPU usage is 0.017."
}, {
"id" : 682,
"gmt_create" : "2022-10-09 21:20:11",
"notify_type" : "RECOVER",
"alarm_rule_id" : 3,
"template_id" : 2,
"alarm_data_event_id" : 42,
"notify_status" : false,
"alarm_content" : "The CPU usage is 0.017."
}, {
"id" : 639,
"gmt_create" : "2022-10-09 21:16:04",
"notify_type" : "ALARM",
"alarm_rule_id" : 3,
"template_id" : 2,
"alarm_data_event_id" : 42,
"notify_status" : false,
"alarm_content" : "The CPU usage is 0.021."
} ],
"total_count" : 4
}

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