ListAlertRecord - ListAlertRecord
Overview
Get alarm records within a time period
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ListAlertRecord . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. | Yes |
StartAt | int | StartAt,Query the alarm record start time (does not support querying data one year before the current time) | Yes |
EndAt | int | EndAt,Query the end time of the alarm record (the interval between the end time and the start time cannot exceed one month) | Yes |
Fuzzy | string | Fuzzy query (supports fuzzy search of resourceID and alarm content) | No |
ProductTypes.N | int | ProductTypes, accurately search for corresponding alarm records based on product type | No |
Levels.N | string | Alarm level, accurately search for corresponding alarm records according to the alarm level | No |
Status.N | string | Alarm status, accurately search for corresponding alarm records based on the alarm status | No |
OrderType | string | Sorting (by default, in reverse order of alarm occurrence time) | No |
Limit | int | The query returns the number of items,default value is 300, maximum value: 300. | No |
Offset | int | Data Offset (Default 0) | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Data | array[AlertRecord] | Alarm data set | No |
TotalCount | int | Alarm total count | No |
Data Model
AlertRecord
Field Name | Type | Description Information | Required |
---|---|---|---|
RecordID | int | Alert Record RecordID | No |
ProjectID | int | ProjectID | No |
StrategyName | string | Alarm Record Trigger Alarm Strategy Name | No |
ProductType | int | Product Type | No |
ProductName | string | Product Type Name | No |
ResourceID | string | Resource ID | No |
MetricID | int | Metric ID | No |
MetricName | string | Metric Name | No |
StrategyID | int | Alarm Record Triggered Alarm Strategy Id | No |
RuleID | int | Alarm Record Triggered Alarm Rule Id | No |
ShieldRuleID | int | Alarm shielding rule id (if a shielding rule is configured and conditions are met) | No |
Content | string | Alarm Content | No |
Level | string | Alarm Level | No |
Status | string | Alarm Status | No |
StartAt | int | Alarm Trigger Time | No |
EndAt | int | Alarm Recovery Time | No |
Example
Request Example
https://api.surfercloud.com/?Action=ListAlertRecord
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=lHbpbCJv
&RecordID=1
&StartAt=4
&EndAt=7
&Fuzzy=hAVEfaDE
&RecordID=6
&StartAt=5
&EndAt=8
&Fuzzy=jVymouaW
&Fuzzy=WYjEKfyo
&Filter.ProductTypes.N=6
&Filter.Levels.N=lxexxlZh
&Filter.Status.N=wakzNxlZ
&OrderType=JXKKXtZY
&Limit=3
&Offset=3
Response Example
{
"Action": "ListAlertRecordResponse",
"Data": [
"pnYwysIe"
],
"RetCode": 0,
"TotalCount": 6
}