云服务器内容精选

  • 请求示例 HTTP的示例 POST /v1/perfservice/alarms/current-alarms/action/clear HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "alarmCsns" : ["28100132","28100152"], "alarmId" : ["279998","279995"], "siteId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca" }
  • 响应参数 返回状态码为200:接口调用成功,响应体参考CommonOut。 表3 CommonOut对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~256个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" 返回状态码为400:接口入参非法的状态返回码。 详细信息请参见实际响应消息体。 返回状态码为500:接口发生内部错误后的状态返回码。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:接口调用成功,响应体参考CommonOut。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为400:接口入参非法的状态返回码。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:接口发生内部错误后的状态返回码。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为200:接口调用成功,响应体参考CurrentAlarmOutput。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "null", "errmsg" : "null", "iterator" : "1&-1283131115#ccf99fa3-5c2d-48a7-a7c4-94116a0f1270", "data" : [ { "csn" : "28100132", "alarmName" : "设备离线", "alarmLevel" : 3, "alarmId" : "279998", "alarmResId" : "OSS", "alarmResName" : "OSS", "latestOccurUtc" : "1711029340291", "alarmCategory" : "1", "additionalInformation" : "additional=the device actively disconnects", "cleared" : 0, "probableCause" : "设备主动离线或网络异常", "repairAction" : "", "alarmGroupId" : "100000" } ] } 返回状态码为400:接口入参非法的状态返回码。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:接口发生内部错误后的状态返回码。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /v1/perfservice/alarms/current-alarms/action/scroll HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "filter" : { "deviceGroupIds" : ["ea25fdbf-8dee-4823-bac2-5bfe8e3359ca","ea25fdbf-8dee-4823-bac2-5bfb8e3358ca"], "csn" : "28100132", "alarmLevels" : ["3","4"], "keyword" : "设备离线" }, "iterator" : "1&-1283131115#ccf99fa3-5c2d-48a7-a7c4-94116a0f1270", "size" : 100 }
  • 响应参数 返回状态码为200:接口调用成功,响应体参考CurrentAlarmOutput。 表4 CurrentAlarmOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "null" errmsg string 0~256个字符。 - 错误信息。 "null" iterator string 0~256个字符。 - 查询迭代算子,起始查询可以不传 "1&-1283131115#ccf99fa3-5c2d-48a7-a7c4-94116a0f1270" data ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 告警数据 - 表5 AlarmRecordData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 csn string 1~256个字符。 - 告警流水号 "28100132" alarmName string 1~1024个字符。 - 告警名称 "设备离线" alarmLevel int32 [1-4] - 告警级别,1-紧急,2-重要,3-次要,4-提示 3 alarmId string 1~64个字符。 - 告警id "279998" alarmResId string 0~64个字符。 - 告警源id "OSS" alarmResName string 0~512个字符。 - 告警源名称 "OSS" latestOccurUtc string 0~64个字符。 - 最近发生时间 "1711029340291" alarmCategory string 0~128个字符。 - 告警类型 "1" additionalInformation string 0~2048个字符。 - 附加信息 "additional=the device actively disconnects" cleared int32 [0-1] - 清除状态,0-未清除,1-已清除 0 probableCause string 0~4096个字符。 - 可能原因 "设备主动离线或网络异常" repairAction string 0~1024个字符。 - 修复建议 "" alarmGroupId string 0~1024个字符。 - 告警分组id "100000" 返回状态码为400:接口入参非法的状态返回码。 详细信息请参见实际响应消息体。 返回状态码为500:接口发生内部错误后的状态返回码。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:接口调用成功,响应体参考AlarmStatisticOutput。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "null", "errmsg" : "null", "data" : [ { "objectId" : "", "criticalAlarmNum" : "10", "majorAlarmNum" : "15", "minorAlarmNum" : "30", "warningAlarmNum" : "40" } ] } 返回状态码为400:接口入参非法的状态返回码。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:接口发生内部错误后的状态返回码。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /v1/perfservice/alarms/current-alarms/statistic HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "objectIds" : [ "" ], "cleared" : "0" }
  • 响应参数 返回状态码为200:接口调用成功,响应体参考AlarmStatisticOutput。 表3 AlarmStatisticOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~256个字符。 - 错误码。 "null" errmsg string 0~256个字符。 - 错误信息。 "null" data ARRAY_REFERENCE 0-500个列表项,详细请参见表4。 告警统计结果数据 - 表4 AlarmStatisticData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 objectId string 1~64个字符。 - 统计对象id - criticalAlarmNum string 0~32个字符。 - 紧急告警统计 "10" majorAlarmNum string 0~32个字符。 - 重要告警统计 "15" minorAlarmNum string 0~32个字符。 - 次要告警统计 "30" warningAlarmNum string 0~32个字符。 - 提示告警统计 "40" 返回状态码为400:接口入参非法的状态返回码。 详细信息请参见实际响应消息体。 返回状态码为500:接口发生内部错误后的状态返回码。 详细信息请参见实际响应消息体。