- 接口描述:发送/取消告警事件消息到nVisual系统
- URL地址:http://ip:port/wapi/v1/notice
- 访问方法:POST
- 请求参数:
Body参数
参数名 | 类型 | 示例值 | 必填 |
title | String | 端口告警 | 是 |
content | String | 端口光功率告警 | 是 |
userId | Long | 94000000000045 | 否(二选一) |
userName | String | Xxx | 否(二选一) |
messageStatus | Boolean | false | 否 |
priority | String | 严重 | 是 |
notes | String | 测试 | 否 |
objectId | Long | 23000000000083 | 否(二选一) |
optCableEvent | Object | { "port":"1.1.1.3-1-1", "eventType":"OTHER", "eventSign":50 } | 否(二选一) |
参数说明:
title:消息标题。
content:消息内容,optCableEvent参数不为空时content可为空,系统自动生成消息内容。
userId:消息接收人id,与参数userName二选一,选填。
userName:消息接收人名称,与参数userId二选一,选填。
messageStatus:推送消息/取消消息,推送消息时填false,表示消息未恢复,可以为空;消息恢复时填true,表示消息已恢复。
priority:消息优先级有:灾难、严重、一般严重、告警、信息、未分类等六个等级。如果填入的值不在六个等级之中,查询归类时归类为“未分类”。
notes:消息备注。
objectId:消息告警对象,若已知nVisual告警对象ID时,直接传入id,如果不知id时,通过传入optCableEvent参数即可,nVisual自行查询。
optCableEvent:port:ip-插槽名称-端口名称
eventType:事件类型,可为空
eventSign:告警距离,为空时认定为端口告警,不为空时线缆告警。
参数示例:
{
"title":"光缆告警",
"content":"光缆断电告警",
"userId":"60",
"messageStatus":"true",
"priority":"严重",
"notice":"cs",
"optCableEvent":{
"port":"1.1.1.3-1-1",
"eventType":"中断",
"eventSign":"70"
}
}
- 响应示例
{
"code": 200,
"data": {
"id": 53000000000391,
"title": "123",
"content": "456",
"userId": 94000000000058,
"messageStatus": true,
"createTime": "2023-02-09T08:50:36.440+0000",
"lastOprTime": "2023-02-09T08:50:36.440+0000",
"jumpUrl": null,
"noticePop": false
"priority": “高”,
"notes": “工单测试”
},
"message": "success"
}