查询最近一次告警。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
POST /events/getLastTimeEvent HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
Object | Body | 否 | A short description of struct |
||
monitorSourceId | Long | Body | 是 | 1 | 监控源ID不能为空 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
requestId | String | XXXXXXXXXXXX | Id of the request |
data | Object | 返回结果 |
|
monitorSourceId | Long | 1 | 告警源ID |
monitorSourceName | String | zabbix | 告警源名称 |
eventTime | String | 2002-09-08 15:30:35 | 告警上报时间 |
eventJson | String | “” | 告警内容 |
示例
请求示例
POST /events/getLastTimeEvent HTTP/1.1
Host:gemp.aliyuncs.com
Content-Type:application/json
{
"monitorSourceId" : 1
}
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetEventResponse>
<requestId>XXXXXXXXXXXX</requestId>
<data>
<monitorSourceId>1</monitorSourceId>
<monitorSourceName>zabbix</monitorSourceName>
<eventTime>2002-09-08 15:30:35</eventTime>
<eventJson>“”</eventJson>
</data>
</GetEventResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"requestId" : "XXXXXXXXXXXX",
"data" : {
"monitorSourceId" : 1,
"monitorSourceName" : "zabbix",
"eventTime" : "2002-09-08 15:30:35",
"eventJson" : "“”"
}
}
错误码
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。