Skip to main content
Version: 4.0

Get Network List

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/networks
Query Parameter
Table 1. Query parameter description
ParameterTypeDescription
keywordstringFuzzy match the name and alias.
pageIndexintegerRequired. Page number. The default is 1.
pageSizeintegerRequired. 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
Table 1. Query parameter description
ParameterTypeDescription
needParentbooleanWhether parent nodes are needed.
excludeTemplateNamearray of stringsExclude the specified template.
deepintegerThe depth of node to be inquired. The default is -1.
needAttributeValuebooleanWhether need attribute values.
needLabelsbooleanWhether 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
Table 2. Query parameter description
ParameterTypeDescription
excludeTemplateNamearray of stringsExclude the specified template.
deepintegerThe depth of node to be inquired. The default is -1.
needAttributeValuebooleanWhether need attribute values.
needLabelsbooleanWhether 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"
    }