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

Querying the Alarm Message List

Function

This API is used to query the alarm trigger details and history.

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

Yes

Integer

Page number.

page_size

Yes

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.

gmt_create_timestamp

Long

Timestamp when the creation starts.

Example Requests

Query the trigger details and history of alarm event 42 in region suzhou-roma-2.

/v1/apm2/openapi/alarm/data/get-alarm-notify-list

{
  "alarm_data_id" : 42,
  "region" : "suzhou-roma-2",
  "page" : 1,
  "page_size" : 10
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "front_alarm_notify_results" : [ {
    "id" : 2180319,
    "gmt_create" : "2023-03-14 10:22:43",
    "gmt_create_timestamp" : 1678760563000,
    "notify_type" : "ALARM",
    "alarm_rule_id" : 333,
    "template_id" : 91,
    "alarm_data_event_id" : 511490,
    "notify_status" : false,
    "alarm_content" : "Alarm occurrence times: 108"
  } ],
  "total_count" : 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.