菜单

发送/取消告警消息到nVisual接口详解

下载
  1. 接口描述:发送/取消告警事件消息到nVisual系统

  2. URL地址:http://ip:port/wapi/v1/notice

  3. 访问方法:POST

  4. 请求参数:

    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:告警距离,为空时认定为端口告警,不为空时线缆告警。

    参数示例:

    json 复制代码
    {
        "title":"光缆告警",
        "content":"光缆断电告警",
        "userId":"60",
        "messageStatus":"true",
        "priority":"严重",
        "notice":"cs",
        "optCableEvent":{
            "port":"1.1.1.3-1-1",
            "eventType":"中断",
            "eventSign":"70"
        }
    }
  5. 响应示例

    json 复制代码
    {
        "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"
    }
上一个
nVisual单点登录-最精简方式
下一个
常见问题
最近修改: 2024-06-21