接口描述:获取系统内所有机柜容器
URL地址:http://ip:port /wapi/v1/container_children
访问方法::Get
请求参数:
Params参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
page | integer | 2 | 否 | 如果分页查看,这是页码 |
size | integer | 1 | 否 | 如果分页查看,这是页面大小 |
{
"per_page": 1,
"page": 2,
"total_pages": 170,
"total_items": 170,
"items": [
{
"id": 48,
"typeId": 26000000002678,
"name": null,
"x": 415.877,
"y": 23.0,
"width": 168.58534,
"height": 690.046,
"physicalWidth": 482.6,
"physicalHeight": 1955.8,
"capacity": 44
}
]
}
接口描述:根据容器id获取机柜容器
URL地址:http://ip:port /wapi/v1/container_children/{id}
访问方法::Get
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
id | integer | 2 | 是 | 容器id |
{
"id": 48,
"typeId": 26000000002678,
"name": null,
"x": 415.877,
"y": 23.0,
"width": 168.58534,
"height": 690.046,
"physicalWidth": 482.6,
"physicalHeight": 1955.8,
"capacity": 44
}
接口描述:根据机柜型号id获取机柜容器
URL地址:http://ip:port /wapi/v1 /container_children/{nodeTypeId}/node_type_id
访问方法::Get
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
nodeTypeId | Long | 26000000131132 | 是 | 机柜型号id |
[
{
"id": 305,
"typeId": 26000000131132,
"name": "F",
"x": 277.964,
"y": 22.8548,
"width": 171.37941496358843,
"height": 700.8917564253733,
"physicalWidth": 482.6,
"physicalHeight": 1866.9,
"capacity": 42
},
{
"id": 306,
"typeId": 26000000131132,
"name": "B",
"x": 550.287,
"y": 22.8548,
"width": 170.99458905773542,
"height": 700.8917564253733,
"physicalWidth": 482.6,
"physicalHeight": 1866.9,
"capacity": 42
}
]
接口描述:传入容器id,删除机柜容器
URL地址:http://ip:port /wapi/v1/container_children/{id}
访问方法::Delete
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
id | Integer | 363 | 否 | 容器容量(U高) |
响应示例:
{
"code":200
}
接口描述:传入容器id和修改的属性,修改机柜容器
URL地址:http://ip:port /wapi/v1/container_children/{id}
访问方法::Delete
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
id | Integer | 363 | 否 | 容器容量(U高) |
Body参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
name | String | 11 | 否 | 容器名 |
x | Double | 146 | 否 | x坐标 |
y | Double | 97 | 否 | Y坐标 |
width | Double | 48 | 否 | 容器宽 |
height | Double | 219 | 否 | 容器高 |
physicalWidth | Double | 1866.9 | 否 | 物理宽度 |
physicalHeight | Double | 482.6 | 否 | 物理高度 |
capacity | integer | 42 | 否 | 容器容量 |
响应示例:
{
"id": 365,
"typeId": 26000000132620,
"name": "",
"x": 279.19934,
"y": 82.838745,
"width": 50,
"height": 50,
"physicalWidth": null,
"physicalHeight": null,
"capacity": 42
}
接口描述:传入机柜型号id和容器宽高、位置,创建机柜容器
URL地址:http://ip:port /wapi/v1/container_children
访问方法::Post
请求参数:
Body参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
capacity | Integer | 42 | 否 | 容器容量(U高) |
height | Double | 146 | 是 | 容器高 |
width | Double | 97 | 是 | 容器宽 |
x | Double | 48 | 是 | 容器x坐标 |
y | Double | 219 | 是 | 容器y坐标 |
typeId | Long | 26000000131132 | 是 | 机柜型号id |
physicalHeight | Double | 1866.9 | 否 | 容器物理高度 |
physicalWidth | Double | 482.6 | 否 | 容器物理宽度 |
{
"id": 363,
"typeId": 26000000131132,
"name": "",
"x": 48.9,
"y": 219,
"width": 97.8,
"height": 146,
"physicalWidth": null,
"physicalHeight": null,
"capacity": null
}
接口描述:传入机柜型号和容器名称获取对应容器
URL地址:http://ip:port /wapi/v1 /container_children/{typeId}/type_id/{name}/name
访问方法::Get
请求参数:
Path参数
参数名 | 类型 | 示例值 | 必填 | 说明 |
---|---|---|---|---|
typeId | Long | 26000000132620 | 是 | 机柜型号id |
name | String | F | 是 | 容器名称 |
响应示例:
{
"code": 200,
"message": "success",
"data": {
"id": 319,
"typeId": 26000000131138,
"name": "F",
"x": 269.177,
"y": 15.3279,
"width": 165.96695,
"height": 718.5379,
"physicalWidth": 482.6,
"physicalHeight": 2089.15,
"capacity": 47
}
}