接口描述:传入分页要求,查询连线模型列表。
URL地址:http://ip:port /wapi/v1/devcatalog/links
访问方法::Get
请求参数:
Parame参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
skip | integer | 0 | 否 | 页码 |
take | integer | 1 | 否 | 一页大小 |
{
"totalCount": 46,
"data": [
{
"num": 1,
"id": 27000000000249,
"description": "室外单模熔纤光缆96芯",
"vendor": "NWVDI",
"model": "OS2-96-OD clone",
"color": "#000000",
"favourite": true,
"enabled": true,
"htLinkType": "{\"linkType\":null,\"startArrowHead\":null,\"endArrowHead\":null,\"autoArrangement\":false}",
"thickness": 3.0,
"category": "通信光缆",
"linkStyle": "实线",
"mpc": null,
"propertyCount": 18,
"overridesCount": 0,
"instances": 23,
"strands": 96,
"unit": null,
"unitPrice": 0.0,
"origin": null
}
]
}
[
{
"id": 27000000000054,
"name": "设备内连线"
},
{
"id": 27000000000057,
"name": "Tray"
}
]
接口描述:传入连线模型id,获取连线模型的详细信息。
URL地址:http://ip:port /wapi/v1/link_types/{linkTypeId}
访问方法::Get
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeId | Long | 27000000000057 | 是 | 连线模型id |
{
"id": 27000000000057,
"name": "Tray",
"color": "#868383",
"thickness": 2.0,
"linkStyle": 0,
"categoryId": 130005,
"snappedToEdge": false,
"matchingPortConnectors": true,
"useForAcraPatch": false,
"excludableFromAcra": false,
"mode": null,
"vendorId": 782,
"description": "网格桥架",
"background": "",
"htLinkType": "{\"linkType\":null,\"startArrowHead\":null,\"endArrowHead\":null,\"autoArrangement\":false}",
"topLeftX": null,
"topLeftY": null,
"bottomRightX": null,
"bottomRightY": null,
"enabled": true,
"system": false,
"favourite": false
}
接口描述:传入连线模型id,删除对应线缆模型。
URL地址:http://ip:port /wapi/v1/link_types/{linkTypeId}
访问方法::Delete
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeId | Long | 27000000000057 | 是 | 连线模型id |
{
"code": 200
}
接口描述:传入连线模型id列表,删除所有对应线缆模型。
URL地址:http://ip:port /wapi/v1/link_types/linkTypesIdList/{linkTypeIdList}
访问方法::Delete
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeIdList | Long | [27000000000057] | 是 | 模型id列表 |
{
"code": 200
}
接口描述:传入连线模型名称、品牌、描述、分类、是否启用、是否收藏、颜色、粗细,创建连线模型。
URL地址:http://ip:port /wapi/v1/link_types
访问方法::Post
请求参数:
Body参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
model | String | testlinktype02 | 是 | 型号名称 |
vendor | String | 3Com | 是 | 品牌名称 |
description | String | testcreat | 型号描述 | |
category | String | 管理跳线 | 模型分类 | |
enable | Boolean | true | 是否启用 | |
favourite | Boolean | true | 是否收藏 | |
thickness | Integer | 3 | 模型粗细 | |
color | String | #000000 | 模型颜色 |
{
"code": 200,
"data": {
"id": 27000000000251,
"name": "testlinktype02",
"color": "#000000",
"thickness": 3,
"linkStyle": 0,
"categoryId": 130000,
"snappedToEdge": true,
"matchingPortConnectors": null,
"useForAcraPatch": null,
"excludableFromAcra": true,
"mode": null,
"vendorId": 307,
"description": "testcreat",
"background": null,
"htLinkType": null,
"topLeftX": null,
"topLeftY": null,
"bottomRightX": null,
"bottomRightY": null,
"enabled": true,
"system": false,
"favourite": true
}
}
接口描述:传入连线模型id和要修改的属性,对连线模型进行修改。
URL地址:http://ip:port /wapi/v1/link_types/{linkTypeId}
访问方法::Put
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeId | Long | 27000000000251 | 是 | 型号id |
Body参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
model | String | testlinktype02 | 否 | 型号名称 |
vendor | String | 3Com | 否 | 品牌名称 |
description | String | testcreat | 否 | 型号描述 |
category | String | 管理跳线 | 否 | 模型分类 |
enable | Boolean | true | 否 | 是否启用 |
favourite | Boolean | true | 否 | 是否收藏 |
thickness | Integer | 3 | 否 | 模型粗细 |
color | String | #f50000 | 否 | 模型颜色 |
{
"code": 200,
"data": {
"id": 27000000000251,
"name": "testlinktype02",
"color": "#f50000",
"thickness": 3,
"linkStyle": 0,
"categoryId": 130000,
"snappedToEdge": true,
"matchingPortConnectors": null,
"useForAcraPatch": null,
"excludableFromAcra": true,
"mode": null,
"vendorId": 307,
"description": "testcreat",
"background": null,
"htLinkType": null,
"topLeftX": null,
"topLeftY": null,
"bottomRightX": null,
"bottomRightY": null,
"enabled": true,
"system": false,
"favourite": true
}
}
接口描述:传入连线模型id和要修改的属性,修改连线模型的背景。
URL地址:http://ip:port/wapi/v1/link_types/{linkTypeId}/set_background_image
访问方法::Put
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeId | Long | 27000000000251 | 是 | 型号id |
Parame参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
File | file | 一个png图片 | 是 | 背景图片 |
{
"code": 200
}
接口描述:传入连线模型id,复制连线模型,复制内容包含名称(原名称+”clone”)、描述、品牌、分类、粗细、颜色、背景图片、纤芯、纤芯文字。
URL地址:http://ip:port/wapi/v1/link_types/{linkTypeId}/clone
访问方法::Post
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeId | Long | 27000000000251 | 是 | 型号id |
{
"code": 200
}
接口描述:传入连线模型导入文件,用导入的方式创建连线模型。
URL地址:http://ip:port/wapi/v1/link_types/import_model
访问方法::Put
请求参数:
Parame参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
File | file | 一个线缆模型文件 | 是 | 模型导入文件 |
{
"code": 200
}
接口描述:传入连线模型id,将此模型按照nVisual可识别的方式导出。
URL地址:http://ip:port/wapi/v1/link_types/export_model/{linkTypeId}
访问方法::Get
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkTypeId | Long | 27000000000251 | 是 | 型号id |
二进制文件流 是个zip文件
接口描述:传入连线id,查询此id对应线缆的模型的信息。
URL地址:http://ip:port/wapi/v1/link_types/get_by_link_entity/{linkId}
访问方法::Get
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkId | Long | 25000000126017 | 是 | 连线id |
{
"code": 200,
"data": {
"id": 27000000000000,
"name": "Link",
"color": "#000000",
"thickness": 1.0,
"linkStyle": 0,
"categoryId": 130007,
"snappedToEdge": false,
"matchingPortConnectors": false,
"useForAcraPatch": false,
"excludableFromAcra": false,
"mode": null,
"vendorId": 782,
"description": "系统保留",
"background": "",
"htLinkType": "{\"linkType\":null,\"startArrowHead\":null,\"endArrowHead\":null,\"autoArrangement\":false}",
"topLeftX": null,
"topLeftY": null,
"bottomRightX": null,
"bottomRightY": null,
"system": true,
"enabled": false,
"favourite": true
}
}
接口描述:传入连线id,修改此id对应线缆的模型的信息。
URL地址:http://ip:port/wapi/v1/link_types/edit_by_link_entity/{linkId}
访问方法::Put
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
linkId | Long | 25000000126017 | 是 | 连线id |
Body参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
color | char | #000000 | 否 | 线缆颜色 |
htLinkType | char | "{\"linkType\":null,\"startArrowHead\":\"arrowHead1\",\"endArrowHead\":null,\"autoArrangement\":false}" | 否 | 连线类型 |
linkStyle | char | "实线" | 否 | 线性 |
thickness | int | 3 | 否 | 粗细 |
{
"code": 200,
"data": {
"id": 27000000000000,
"name": "Link",
"color": "#000000",
"thickness": 1.0,
"linkStyle": 0,
"categoryId": 130007,
"snappedToEdge": false,
"matchingPortConnectors": false,
"useForAcraPatch": false,
"excludableFromAcra": false,
"mode": null,
"vendorId": 782,
"description": "系统保留",
"background": "",
"htLinkType": "{\"linkType\":null,\"startArrowHead\":null,\"endArrowHead\":null,\"autoArrangement\":false}",
"topLeftX": null,
"topLeftY": null,
"bottomRightX": null,
"bottomRightY": null,
"system": true,
"enabled": false,
"favourite": true
}
}