菜单

15.效果类

下载

效果类

获取所有效果

  • 接口描述:获取nVisual内所有显示效果。
  • URL地址:http://ip:port /wapi/v1/effect
  • 访问方法::Get
  • 请求参数:null
  • 响应示例:

[

{

"id": 18000000000001,

"type": 1,

"objectType": 1,

"name": "告警",

"code": "alarm",

"description": "指标报警"

},

{

"id": 18000000000002,

"type": 1,

"objectType": 1,

"name": "Online",

"code": "online",

"description": "正常工作状态"

}

]

根据效果描述获取效果

  • 接口描述:传入效果描述,获取对应效果。

  • URL地址:http://ip:port /wapi/v1/effect/description/{description}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
description String 指标报警 效果描述
  • 响应示例:

[

{

"id": 18000000000016,

"type": 1,

"objectType": 3,

"name": "告警",

"code": "portAlarm",

"description": "指标报警"

}

]

根据效果名称获取效果

  • 接口描述:传入效果名称,获取对应效果。

  • URL地址:http://ip:port /wapi/v1/effect/name/{name}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
name String 告警 效果名
  • 响应示例:

[

{

"id": 18000000000016,

"type": 1,

"objectType": 3,

"name": "告警",

"code": "portAlarm",

"description": "指标报警"

}

]

增加效果

  • 接口描述:传入效果名称、对象分类、效果分类、效果码、效果描述,创建效果。

  • URL地址:http://ip:port /wapi/v1/addEffect

  • 访问方法::Post

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
name String test 效果名
type integer 1 效果分类
objectType integer 1 对象分类
code String test 效果码
description String 测试 效果描述
  • 响应示例:

[

{

"id": 18000000000032,

"type": 1,

"objectType": 1,

"name": "test",

"code": "test",

"description": "test"

}

]

刪除效果

  • 接口描述:传入效果id,刪除效果。

  • URL地址:http://ip:port /wapi/v1/deleteEffect/{effectId}

  • 访问方法::Delete

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
effectId Long 18000000000032 效果id
  • 响应示例:

{

"code": 200

}

修改效果

  • 接口描述:传入效果id,和要修改的效果信息,修改效果。

  • URL地址:http://ip:port /wapi/v1/modifyEffect

  • 访问方法::Put

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
id Long 18000000000032 效果id
name String test 效果名
type integer 1 效果分类
objectType integer 1 对象分类
code String test 效果码
description String 测试 效果描述
  • 响应示例:

[

{

"id": 18000000000032,

"type": 1,

"objectType": 1,

"name": "test",

"code": "test",

"description": "test"

}

]

最近修改: 2025-02-27