Get Network List
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks
Query Parameter
Parameter | Type | Description |
---|---|---|
keyword | string | Fuzzy match the name and alias. |
pageIndex | integer | Required. Page number. The default is 1. |
pageSize | integer | Required. The number of data on each page. The default is 20 and the maximum is 500. |
Response
- 200: Successful.
{
"code": 200,
"data": {
"data": [
{
"comment": "test query on network",
"displayName": "network1",
"enName": "network1",
"id": 15555
}
],
"pageIndex": 1,
"pageSize": 20,
"total": 100
},
"detail": "string",
"message": "ok"
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Create Network
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks
Request Body
{
"comment": "newly created network",
"displayName": "network1",
"enName": "network1" //alias
}
Response
- 200: Successful.
{
"code": 200,
"data": 19999,
"detail": "string",
"message": "ok"
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Edit Network
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}
networkName: Required. Network alias.
Request Body
{
"comment": "edited network",
"displayName": "edit network"
}
Response
- 200: Successful.
{
"code": 200,
"message": "ok",
"data": null,
"detail": null
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Delete Network
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}
networkName: Required. Network alias.
Response
- 200: Successful.
{
"code": 200,
"message": "ok",
"data": null,
"detail": null
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Create Network Node
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}/nodes
networkName: Required. Network alias.
Request Body
{
"instanceName": "instance1", //instance alias of the current node
"networkOrder": 2.3, //sorting field
"parentId": -1, //Parent ID. Leave it empty or set it to -1 when it is root node
"templateName": "t1", //template alias of the current node
"templateNamespace": "system" //template namespace of the current node
}
Response
- 200: Successful.
{
"code": 200,
"data": 19999,
"detail": "string",
"message": "ok"
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Get Children Node Tree of Current Node
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}/nodes/{nodeId}
- networkName: Required. String. Network alias.
- nodeId: Required. Integer. Node ID.
Query parameters
Parameter | Type | Description |
---|---|---|
needParent | boolean | Whether parent nodes are needed. |
excludeTemplateName | array of strings | Exclude the specified template. |
deep | integer | The depth of node to be inquired. The default is -1. |
needAttributeValue | boolean | Whether need attribute values. |
needLabels | boolean | Whether need labels. |
Response
- 200: Successful.
{
"code": 200,
"data": {
"children": [
{}
],
"content": {},
"hasChildren": false,
"instanceName": "instance1",
"networkOrder": 2.3,
"nodeId": 12456,
"parent": {},
"parentNodeId": 12455,
"templateName": "t1",
"templateNamespace": "system",
"labels": [
"label1"
]
},
"detail": "string",
"message": "ok"
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Edit Network Node
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}/nodes/{nodeId}
- networkName: Required. String. Network alias.
- nodeId: Required. Integer. Node ID.
Request Body
{
"networkOrder": 2.3,
"parentId": 16666
}
- networkOrder: Sorting field. Double.
- parentId: Integer. Parent node ID.
Response
- 200: Successful.
{
"code": 200,
"message": "ok",
"data": null,
"detail": null
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Recursion Delete Network Node
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}/nodes/{nodeId}
Response
- 200: Successful.
{
"code": 200,
"message": "ok",
"data": null,
"detail": null
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Get Network Tree According to Network Name
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks/{networkName}/tree
networkName: Required. Network alias.
Query parameters
Parameter | Type | Description |
---|---|---|
excludeTemplateName | array of strings | Exclude the specified template. |
deep | integer | The depth of node to be inquired. The default is -1. |
needAttributeValue | boolean | Whether need attribute values. |
needLabels | boolean | Whether need labels. |
Response
- 200: Successful.
{
"code": 200,
"data": {
"children": [
{}
],
"content": {},
"hasChildren": false,
"instanceName": "instance1",
"networkOrder": 2.3,
"nodeId": 12456,
"parent": {},
"parentNodeId": 12455,
"templateName": "t1",
"templateNamespace": "system",
"labels": [
"label1"
]
},
"detail": "string",
"message": "ok"
} - 500: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}