菜单

37.节点类

下载

节点类

创建节点

  • 接口描述:传入节点型号和位置等属性,创建节点。

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

  • 访问方法::Post

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
nodeParentId Long 24000000051255 父节点id
nodeTypeId Long 26000000000000 节点型号id
visNodeWidth double 50 节点投影宽
visNodeHeight double 50 节点投影高
visNodeX double 12875251 投影x坐标
visNodeY double 5294956 投影y坐标
mapZoom integer 19 地图层级
  • 响应示例:

{

"node": {

"id": 24000000055010,

"typeId": 26000000000000,

"parentId": 24000000051255,

"name": "node",

"background": null,

"route": "24000000000001/24000000000693/24000000051254/24000000051255/24000000055010",

"diagramWidth": 1000,

"diagramHeight": 750,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": 10,

"mapZoom": 16,

"enableMvtLevel": null,

"blocked": false

},

"vis_node": {

"id": 2781725,

"nodeId": 24000000055010,

"diagramId": 24000000051255,

"x": 12875503.720864996,

"y": 5295446.828942307,

"z": null,

"width": 50,

"height": 50,

"depth": 0,

"imageOverride": null,

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": 0,

"displayed": true,

"new": true,

"master": true

},

"properties": [

{

"id": 28000000333111,

"nodeTypeId": 26000000000000,

"name": "IP",

"defaultValue": null,

"position": 9,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000335485,

"nodeTypeId": 26000000000000,

"name": "端口数",

"defaultValue": null,

"position": 11,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000332786,

"nodeTypeId": 26000000000000,

"name": "监测状态",

"defaultValue": null,

"position": 5,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000333110,

"nodeTypeId": 26000000000000,

"name": "密码",

"defaultValue": null,

"position": 8,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000003736,

"nodeTypeId": 26000000000000,

"name": "名称",

"defaultValue": null,

"position": 0,

"mandatory": true,

"displayed": true,

"fontSize": 102.605774,

"fontColor": "#ff0000",

"notEditable": false,

"offsetX": 1,

"offsetY": 52.423344,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": false,

"italic": false,

"underline": false,

"fontFamily": "Arial",

"fillColor": "#FFFFFF",

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": "123",

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": false,

"uniqueForAllTypes": false

},

{

"id": 28000000334021,

"nodeTypeId": 26000000000000,

"name": "设备类型oid",

"defaultValue": null,

"position": 6,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000241711,

"nodeTypeId": 26000000000000,

"name": "生命周期",

"defaultValue": null,

"position": 2,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": true,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000342911,

"nodeTypeId": 26000000000000,

"name": "视图信息",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": true,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000334019,

"nodeTypeId": 26000000000000,

"name": "系统描述",

"defaultValue": null,

"position": 3,

"mandatory": null,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000342930,

"nodeTypeId": 26000000000000,

"name": "效果",

"defaultValue": null,

"position": 13,

"mandatory": true,

"displayed": null,

"fontSize": 10,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000062570,

"nodeTypeId": 26000000000000,

"name": "型号",

"defaultValue": "",

"position": 1,

"mandatory": true,

"displayed": false,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": false,

"italic": false,

"underline": false,

"fontFamily": "",

"fillColor": "",

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": "",

"system": true,

"inProperties": true,

"typeField": false,

"uniqueForThisType": false,

"uniqueForAllTypes": false

},

{

"id": 28000000333109,

"nodeTypeId": 26000000000000,

"name": "用户名",

"defaultValue": null,

"position": 7,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000335486,

"nodeTypeId": 26000000000000,

"name": "运行时间",

"defaultValue": null,

"position": 10,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000343204,

"nodeTypeId": 26000000000000,

"name": "主机id",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000334020,

"nodeTypeId": 26000000000000,

"name": "主机名",

"defaultValue": null,

"position": 4,

"mandatory": null,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

},

{

"id": 28000000341898,

"nodeTypeId": 26000000000000,

"name": "状态",

"defaultValue": null,

"position": 12,

"mandatory": true,

"displayed": null,

"fontSize": 10,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

],

"shape": null,

"displayed_vis_node_fields": [

{

"visNodeField": {

"visNodeId": 2781725,

"propertyValueId": 6447036,

"offsetY": 5295499.252285966,

"offsetX": 12875504.720864996,

"fontSize": 12.5,

"canMove": true,

"color": null,

"state": true,

"angle": 0,

"bold": false,

"italic": false,

"underline": false,

"fontFamily": "Arial",

"backgroundColor": "#FFFFFF",

"align": false,

"anchor": false,

"uprightAlignment": null,

"justification": false,

"mapZoom": 16,

"new": true

},

"nodePropertyValue": {

"propertyName": "名称",

"id": 6447036,

"nodeId": 24000000055010,

"propertyId": 28000000003736,

"value": "node"

}

}

],

"ports": [],

"node_type": {

"id": 26000000000000,

"name": "node",

"image": "xejh0pfy.svg",

"image2": null,

"background": null,

"defaultWidth": 500,

"defaultHeight": 500,

"typeGroup": 1,

"hierarchyBrowserLabel": 28000000003736,

"width": 500,

"height": 500,

"templateId": null,

"vendorId": 880,

"description": "节点",

"keepAspectRatio": true,

"showContainerChildren": false,

"doubleClickBehavior": "test",

"categoryId": null,

"snmpOid": "",

"independentMounting": false,

"inStock": -1,

"nodeClassGroupId": 110012,

"nodeClassId": null,

"creator": null,

"createDate": null,

"deep": 0,

"topLeftX": null,

"topLeftY": null,

"bottomRightX": null,

"bottomRightY": null,

"enabled": true,

"favourite": false,

"system": true

}

}

根据id查询节点

  • 接口描述:传入节点id,查询节点详细信息。

  • URL地址:http://ip:port /wapi/v1/nodes/{nodeId}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id
  • 响应示例:

{

"code": 200,

"message": "success",

"data": {

"id": 24000000055031,

"typeId": 26000000000000,

"parentId": 24000000000693,

"name": "node",

"background": null,

"route": "24000000000001/24000000000693/24000000055031",

"diagramWidth": 1000.0,

"diagramHeight": 750.0,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": 10.0,

"mapZoom": 3.0,

"enableMvtLevel": null,

"blocked": false

}

}

获取启用mvt层级

  • 接口描述:传入节点id,查询节点是否启用mvt显示,如果启用则显示层级。

  • URL地址:http://ip:port /wapi/v1/nodes/mvt_state/{nodeId}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id
  • 响应示例:

{

"code": 200,

"data": {

"enableMvt": true,

"enableMvtLevel": 14

}

}

根据id删除节点

  • 接口描述:传入节点id,删除节点。

  • URL地址:http://ip:port /wapi/v1/nodes/{nodeId}

  • 访问方法::Delete

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id
  • 响应示例:

{

"code": 200

}

根据id修改节点

  • 接口描述:传入节点id,和要修改的节点属性,修改节点。

  • URL地址:http://ip:port /wapi/v1/nodes/{nodeId}

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id

Body参数示例

参数名 类型 示例值 必填 说明
doubleClickBehavior String "1" 双击规则
  • 响应示例:

{

"code": 200,

"message": "成功",

"data": {

"id": 24749000636614,

"typeId": 26000000132991,

"parentId": 24749000621241,

"name": "熔纤包-red1 144 ",

"background": "pmagou3a.svg",

"route": "24000000000001/24000000087169/24749000621241/24749000636614",

"diagramWidth": 1000.0,

"diagramHeight": 750.0,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 82,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "1",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": null,

"mapZoom": 18.0,

"enableMvtLevel": null,

"mvtStyle": null,

"groupId": null,

"blocked": false

}

}

设置节点背景

  • 接口描述:传入节点id和图片,给节点设置背景图片。地图场景和设备、板卡、机柜节点除外。

  • URL地址:http://ip:port /wapi/v1/nodes/{nodeId}/set_background_image

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id

Parame参数

参数名 类型 示例值 必填 说明
File file 一张png图片 背景图片
  • 响应示例:

{

"code": 200,

"message": "success",

"data": {

"id": 24000000051254,

"typeId": 26000000000000,

"parentId": 24000000000693,

"name": "earth",

"background": "l5xh8sxz.svg",

"route": "24000000000001/24000000000693/24000000051254",

"diagramWidth": 1000,

"diagramHeight": 750,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": 10,

"mapZoom": 3,

"enableMvtLevel": null,

"blocked": false

}

}

清除节点背景

  • 接口描述:传入节点id,清除此节点的背景图片。

  • URL地址:http://ip:port /wapi/v1/nodes/{nodeId}/remove_background_image

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id
  • 响应示例:

{

"code": 200,

"message": "success",

"data": {

"id": 24000000055033,

"typeId": 26000000000004,

"parentId": 24000000000693,

"name": "Shape",

"background": null,

"route": "24000000000001/24000000000693/24000000055033",

"diagramWidth": 1000,

"diagramHeight": 750,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": 10,

"mapZoom": 3,

"enableMvtLevel": null,

"blocked": false

}

}

拷贝节点

  • 接口描述:传入要被拷贝的节点id和位置,拷贝节点。

  • URL地址:http://ip:port/wapi/v1/nodes/copy/{destinationDiagramId}/destination_diagram_id/{targetVisNodeId}/target_vis_node_id

  • 访问方法::Post

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id

Body参数

参数名 类型 示例值 必填 说明
visNodeX Double 538.03 投影x坐标
visNodeY Double 220.03 投影y坐标
  • 响应示例:

{

"node": {

"id": 24000000055032,

"typeId": 26000000000000,

"parentId": 24000000000693,

"name": "node",

"background": null,

"route": "24000000000001/24000000000693/24000000055032",

"diagramWidth": 1000,

"diagramHeight": 750,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": null,

"mapZoom": 3,

"enableMvtLevel": null,

"blocked": false

},

"vis_node": {

"id": 2781747,

"nodeId": 24000000055032,

"diagramId": 24000000000693,

"x": 538.0306851618327,

"y": 220.03993274485077,

"z": 0,

"width": 50,

"height": 50,

"depth": 0,

"imageOverride": null,

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": 0,

"displayed": true,

"new": true,

"master": true

},

"properties": [

{

"id": 28000000333111,

"nodeTypeId": 26000000000000,

"name": "IP",

"defaultValue": null,

"position": 9,

"mandatory": true,

"displayed": null,

"fontSize": 100,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

],

"shape": null,

"displayed_vis_node_fields": [

{

"visNodeField": {

"visNodeId": 2781747,

"propertyValueId": 6447100,

"offsetY": 52.423343658447266,

"offsetX": 1,

"fontSize": 10.260577201843262,

"canMove": true,

"color": "#ff0000",

"state": true,

"angle": 0,

"bold": false,

"italic": false,

"underline": false,

"fontFamily": "Arial",

"backgroundColor": "#FFFFFF",

"align": false,

"anchor": false,

"uprightAlignment": null,

"justification": false,

"mapZoom": null,

"new": true

},

"nodePropertyValue": {

"propertyName": "名称",

"id": 6447100,

"nodeId": 24000000055032,

"propertyId": 28000000003736,

"value": "node"

}

}

],

"ports": [],

"node_type": {

"id": 26000000000000,

"name": "node",

"image": "xejh0pfy.svg",

"image2": null,

"background": null,

"defaultWidth": 500,

"defaultHeight": 500,

"typeGroup": 1,

"hierarchyBrowserLabel": 28000000003736,

"width": 500,

"height": 500,

"templateId": null,

"vendorId": 880,

"description": "节点",

"keepAspectRatio": true,

"showContainerChildren": false,

"doubleClickBehavior": "test",

"categoryId": null,

"snmpOid": "",

"independentMounting": false,

"inStock": -1,

"nodeClassGroupId": 110012,

"nodeClassId": null,

"creator": null,

"createDate": null,

"deep": 0,

"topLeftX": null,

"topLeftY": null,

"bottomRightX": null,

"bottomRightY": null,

"enabled": true,

"favourite": false,

"system": true

}

}

创建图片节点

  • 接口描述:传入节点型号和位置等属性,创建节点。

  • URL地址:http://ip:port /wapi/v1/nodes/free_drawing

  • 访问方法::Post

  • 请求参数:

    Param参数

参数名 类型 示例值 必填 说明
File file 一个图片文件 父节点id
Json json {"nodeTypeId":26000000000005,"nodeParentId":"24000000000693","visNodeX":150,"visNodeY":48,"visNodeWidth":300,"visNodeHeight":96} 节点型号id
  • 响应示例:

{

"node": {

"id": 24000000055035,

"typeId": 26000000000005,

"parentId": 24000000000693,

"name": "FreeDrawing",

"background": null,

"route": "24000000000001/24000000000693/24000000055035",

"diagramWidth": null,

"diagramHeight": null,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": null,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": null,

"mapZoom": 4,

"enableMvtLevel": null,

"blocked": false

},

"node_type": {

"id": 26000000000005,

"name": "FreeDrawing",

"image": "5drqrtpc.png",

"image2": null,

"background": null,

"defaultWidth": 3509,

"defaultHeight": 4963,

"typeGroup": 6,

"hierarchyBrowserLabel": 28000000003731,

"width": null,

"height": null,

"templateId": null,

"vendorId": 962,

"description": null,

"keepAspectRatio": true,

"showContainerChildren": false,

"doubleClickBehavior": "test",

"categoryId": null,

"snmpOid": null,

"independentMounting": false,

"inStock": -1,

"nodeClassGroupId": null,

"nodeClassId": null,

"creator": null,

"createDate": null,

"deep": 0,

"topLeftX": null,

"topLeftY": null,

"bottomRightX": null,

"bottomRightY": null,

"enabled": true,

"favourite": true,

"system": true

},

"vis_node": {

"id": 2781750,

"nodeId": 24000000055035,

"diagramId": 24000000000693,

"x": 150,

"y": 48,

"z": null,

"width": 300,

"height": 96,

"depth": 0,

"imageOverride": "gum2rgb9.svg",

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": null,

"displayed": true,

"new": true,

"master": true

},

"properties": [

{

"id": 28000000158311,

"nodeTypeId": 26000000000005,

"name": "A端口",

"defaultValue": null,

"position": 2,

"mandatory": false,

"displayed": true,

"fontSize": 4.50085,

"fontColor": "#000000",

"notEditable": false,

"offsetX": -2.47419,

"offsetY": 1.49631,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": false,

"italic": false,

"underline": false,

"fontFamily": "Arial",

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 1,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": false,

"uniqueForAllTypes": false

}

]

}

创建快捷方式

  • 接口描述:传入要创建快捷方式的节点id和位置,创建节点快捷方式。

  • URL地址:http://ip:port/wapi/v1/nodes/alias/{nodeIdToBeAliased}

  • 访问方法::Post

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id

Body参数

参数名 类型 示例值 必填 说明
visNodeX Double 538.03 投影x坐标
visNodeY Double 220.03 投影y坐标
visNodeHeight Double 50 投影高
visNodeWidth Double 50 投影宽
nodeParentId Long 24000000000693 父节点id
  • 响应示例:

{

"id": 2781751,

"nodeId": 24000000055036,

"diagramId": 24000000000693,

"x": 563.0306851618327,

"y": 245.03993274485077,

"z": null,

"width": 50,

"height": 50,

"imageOverride": null,

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": 0,

"displayed": true,

"typeId": 26000000000000,

"name": "node",

"parentId": 24000000000693,

"slotId": null,

"masterId": 24000000055031,

"route": "24000000000001/24000000000693/24000000055036",

"mapZoom": 3,

"nodeTypeName": "node",

"nodeTypeImage": "xejh0pfy.svg",

"nodeTypeTypeGroup": 1,

"nodeTypeHeight": 500,

"nodeTypeWidth": 500,

"mountedNodesData": null,

"shapes": null,

"diagramSublink": null,

"diagramSublinks": null,

"unitsHeight": null,

"hasEmbeddedFile": false,

"clusterSize": null,

"table": [

"型号:node",

"系统描述:",

"生命周期:"

],

"depth": 0,

"master": true,

"blocked": false,

"cluster": null

}

剪切节点

  • 接口描述:传入要创建快捷方式的节点id和位置,创建节点快捷方式。

  • URL地址:http://ip:port/wapi/v1/nodes/cut_paste_multiple_nodes_2/{destinationDiagramId}/destination_diagram_id

  • 访问方法::Post

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
destinationDiagramId Long 24000000055033 目的图层id

Body参数

参数名 类型 示例值 必填 说明
visNodes Array[Map] 剪切节点列表
visNode Map 如下 剪切节点
targetNodeId Long 24000000055034 节点id
type String node 节点型号名
x Double 538.03 目的x位置
y Double 220.03 目的y位置
  • 响应示例:

{

"code": 200,

"message": "success",

"data": [

{

"code": 200,

"message": "success",

"data": {

"id": 2781749,

"nodeId": 24000000055034,

"diagramId": 24000000055033,

"x": 525.2051582649473,

"y": 347.010550996483,

"z": null,

"width": 91.37055837563457,

"height": 63.45177664974621,

"depth": 0,

"imageOverride": null,

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": -1,

"displayed": true,

"new": true,

"master": true

}

}

]

}

大小设为默认

  • 接口描述:传入视图id和节点id,将当前节点大小设为默认大小。

  • URL地址:http://ip:port/wapi/v1/nodes/{nodeId}/node_id/{diagramId}/diagram_id/set_default_size

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000055031 节点id
diagramId Long 24000000000693 视图id
  • 响应示例:

{

"id": 2781746,

"nodeId": 24000000055031,

"diagramId": 24000000000693,

"x": 513.0306851618327,

"y": 195.03993274485077,

"z": null,

"width": 50,

"height": 50,

"depth": 0,

"imageOverride": null,

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": 0,

"displayed": true,

"new": true,

"master": true

}

重置大小

  • 接口描述:传入视图id和节点id列表,将当列表内id对应的节点的大小改为默认大小。

  • URL地址:http://ip:port/wapi/v1/nodes/{diagramId}/diagram_id/reset_default_size_bulk访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
diagramId Long 24000000000693 视图id

Body参数

参数名 类型 示例值 必填 说明
nodeIds Array[Long] [24000000055031] 节点id列表
  • 响应示例:

{

"code": 200,

"message": "success",

"data": [

{

"id": 2781746,

"nodeId": 24000000055031,

"diagramId": 24000000000693,

"x": 513.0306851618327,

"y": 195.03993274485077,

"z": null,

"width": 50,

"height": 50,

"depth": 0,

"imageOverride": null,

"keepAspectRatio": false,

"angle": 0,

"canMove": true,

"canResize": true,

"canRotate": true,

"canDelete": true,

"zOrder": 0,

"displayed": true,

"new": true,

"master": true

}

]

}

查询子节点

  • 接口描述:传入父节点id,查询子节点列表。

  • URL地址:http://ip:port /wapi/v1/nodes/childNodes/{nodeId}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000054960 父节点id
  • 响应示例:

[

{

"id": 24000000054962,

"typeId": 26000000018139,

"parentId": 24000000054960,

"name": "aaaaaaaaa",

"background": null,

"route": "24000000000001/24000000000693/24000000054960/24000000054962",

"diagramWidth": 1000.0,

"diagramHeight": 750.0,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": null,

"mapCoordinateTop": null,

"mapCoordinateRight": null,

"mapCoordinateBottom": null,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": null,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": 10.0,

"mapZoom": 18.0,

"enableMvtLevel": null,

"blocked": false

}

]

查询节点相关信息

  • 接口描述:传入节点id,获取节点、节点型号、节点属性、节点端口的详细信息。

  • URL地址:http://ip:port /wapi/v1/nodes/nodesRelated/{nodeId}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeId Long 24000000054960 节点id
  • 响应示例:

{

"node": {

"id": 24000000054960,

"typeId": 26000000000000,

"parentId": 24000000000693,

"name": "node",

"background": null,

"route": "24000000000001/24000000000693/24000000054960",

"diagramWidth": 1000.0,

"diagramHeight": 750.0,

"diagramMarginSize": null,

"hidden": null,

"slotId": null,

"masterId": null,

"insertUserId": 94000000000058,

"templateId": null,

"adaNodeId": null,

"connectorCode": null,

"rackOverrideType": null,

"showContainerChildren": true,

"doubleClickBehavior": "default",

"mapCoordinateLeft": 1.2710031463849979E7,

"mapCoordinateTop": 4557617.891538161,

"mapCoordinateRight": null,

"mapCoordinateBottom": 4.860167132222857,

"mapUnitsType": null,

"dinamicMapSupport": null,

"autoLayoutState": null,

"mapSource": 1001,

"displayGrid": null,

"snapToGrid": null,

"gridSpacingY": null,

"gridSpacingX": null,

"pageColor": "#FFFFFF",

"overrideTemplateGrid": null,

"readOnlyForNonAdmins": null,

"collectorId": null,

"diagramScale": 10.0,

"mapZoom": 3.0,

"enableMvtLevel": null,

"blocked": false

},

"properties": [

{

"nodePropertyValuesId": 6446779,

"nodePropertyValuesValue": "node",

"nodePropertiesName": "名称"

},

{

"nodePropertyValuesId": 6446780,

"nodePropertyValuesValue": "node",

"nodePropertiesName": "型号"

}

],

"ports": [],

"node_type": {

"id": 26000000000000,

"name": "node",

"image": "xejh0pfy.svg",

"image2": null,

"background": null,

"defaultWidth": 500.0,

"defaultHeight": 500.0,

"typeGroup": 1,

"hierarchyBrowserLabel": 28000000003736,

"width": 500.0,

"height": 500.0,

"templateId": null,

"vendorId": 880,

"description": "节点",

"keepAspectRatio": true,

"showContainerChildren": false,

"doubleClickBehavior": "test",

"categoryId": null,

"snmpOid": "",

"independentMounting": false,

"inStock": -1,

"nodeClassGroupId": 110012,

"nodeClassId": null,

"creator": null,

"createDate": null,

"deep": 0.0,

"topLeftX": null,

"topLeftY": null,

"bottomRightX": null,

"bottomRightY": null,

"enabled": true,

"favourite": false,

"system": true

}

}

自动上架

  • 接口描述:传入机柜id,设备型号id,自动创建并上架设备。

  • URL地址:http://ip:port /wapi/v1/nodes/autoMounted

  • 访问方法::Post

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
parentId Long 24000000054122 机柜id
nodeTypeId Long 26000000017831 设备型号id
  • 响应示例:

{

"code": 201,

"message": "Success",

"data": {

"nodeId": 24000000055048,

"diagramId": 24000000054122,

"containerChildId": 306,

"rackPosition": 1,

"units": 1

}

}

设备发现创建节点

  • 接口描述:传入节点名称、型号名称、ip和视图id,LLDP设备发现模块根据ip发现设备创建设备。

  • URL地址:http://ip:port /wapi/v1/nodes/creat_by_monitor

  • 访问方法::Post

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
name String Test 节点名称
type String test 节点型号
ip String 192.178.11.1 Ip地址
diagramId Long 24000000054122 视图id
  • 响应示例:

{

"code": 201,

"message": "Success",

"data": {

"nodeId": 24000000055048,

"diagramId": 24000000054122,

"containerChildId": 306,

"rackPosition": 1,

"units": 1

}

}

最近修改: 2025-02-27