菜单

6. 路由类

下载

路由类

查看链路路由

  • 接口描述:传入对象id,查看对象链路路由。

    在nVisual内右键对象,创建链路时调用,配合“链路创建连接”接口用于快速创建连接并同时可查看链路。

    形状 低可信度描述已自动生成
  • URL地址:http://ip:port /wapi/v1/circuit_layout/{objectId}/entity_id

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
objectId Long 24000000433036 查看链路的对象id
  • 响应示例:

    {

    "code": 200,

    "data": {

    "nodes": [

    {

    "circuitLayoutLink": null,

    "displayNodeImage": "vuub1xcs.png",

    "displayNodeDefaultWidth": 482.6,

    "displayNodeDefaultHeight": 44.45000076293945,

    "displayNodeId": 24000000433036,

    "displayNodeName": "11D73F38",

    "node": {

    "nodeId": 24000000433036,

    "nodeLabel": "设备",

    "nodeName": "11D73F38",

    "nodeTypeGroup": 7

    },

    "parentNode": {

    "nodeId": 24000000194088,

    "nodeLabel": "机柜",

    "nodeName": "11D73",

    "nodeTypeGroup": 8

    },

    "grandparentNode": {

    "nodeId": 24000000173155,

    "nodeLabel": "通用",

    "nodeName": "数据中心11",

    "nodeTypeGroup": 5

    },

    "greatGrandparentNode": null,

    "sublinkInfo": null

    }

    ]

    },

    "message": "success"

    }

链路创建连接

  • 接口描述:传入本端对象id,对端对象id,线缆名称,线缆型号id,创建连线。

  • URL地址:http://ip:port /wapi/v1/circuit_layout/connect_node

  • 访问方法::POST

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
fromNode Long 24000000432449 本端对象id
toNode Long 24000000433048 对端对象id
name String "link" 线缆名称
typeId Long 27000000000197 线缆型号id
  • 请求示例:

{

"fromNode": 23416005544815,

"toNode": 23416005544842,

"name": "1",

"typeId": 27000000000144

}

  • 响应示例:

{

"code": 201,

"message": "created",

"data": {

"node": {

"displayNodeId": 24000000433048,

"displayNodeName": "node",

"displayNodeImage": "xejh0pfy.svg",

"displayNodeDefaultWidth": 439.79424652618087,

"displayNodeDefaultHeight": 458.21804589567387,

"greatGrandparentNode": {

"nodeId": null,

"nodeName": null,

"nodeTypeGroup": null,

"nodeLabel": null

},

"grandparentNode": {

"nodeId": 24000000000001,

"nodeName": "顶层",

"nodeTypeGroup": null,

"nodeLabel": "顶层"

},

"parentNode": {

"nodeId": 24000000429790,

"nodeName": "node",

"nodeTypeGroup": 1,

"nodeLabel": "节点"

},

"node": {

"nodeId": 24000000433048,

"nodeName": "node",

"nodeTypeGroup": 1,

"nodeLabel": "节点"

},

"circuitLayoutLink": {

"linkId": 25000000134310,

"linkColor": "#ea5606",

"linkThickness": 1,

"fromNode": 24000000432449,

"toNode": 24000000433048

},

"sublinkInfo": null

}

}

}

最近修改: 2025-02-27