Class

NodeServices

NodeServices(ctx)

Node Services to get/write objects as tree, etc.

Constructor

# new NodeServices(ctx)

Parameters:
Name Type Description
ctx Context

Context instance

Since:
  • 1.0, 09.2025, jh

View Source infohub/Node.js, line 42

Classes

NodeServices

Methods

# async getDocument(node_sid, query, cb)

Parameters:
Name Type Description
node_sid *
query object

= { "as_blob" : true download as file, false if the document should be loaded as json
}

cb *

data = { "doc" : json or blob
}

View Source infohub/Node.js, line 180

# async getNodeData(node_sid, query, cb) → {Promise.<RestResponse>}

Parameters:
Name Type Description
node_sid *
query *
cb *

View Source infohub/Node.js, line 311

Promise.<RestResponse>

# async getNodePath(node_sid, query, cb) → {Promise.<ApiResponse>}

Get path of node hierarchy from root to node.

Parameters:
Name Type Description
node_sid *
query *
cb *

View Source infohub/Node.js, line 262

Promise.<ApiResponse>

# async getTree(node_sid, params, cb)

Parameters:
Name Type Description
node_sid string
params object

= { 'depth' 'members' 'properties' 'geometry' 'filter' 'nodes' 'relations' 'relations_right' 'groupby' 'sortby' 'limit' 'offset' } each parameter has to be encoded as URI component

cb function

}}

View Source infohub/Node.js, line 90

Example
{
     'members': ['info', 'properties', 'relations', 'relations_right'],
     'filter': '$object_type ~eq~ \'act_issue\'',
     'depth': 0,
     'sortby': 'issue:wbs##xs:string',
     'relations_right': JSON.stringify({
         'members': ['info', 'properties'],
         'filter': '$name ~eq~ \'cnSUCCESSORS\'',
     }),
}
}

# async saveTree(parentnode_sid, node_tree, cb)

Update/create node tree. Replace existing nodes in 'parentnode_sid', if existing nodes are deleted if not in 'node_tree'

POST /{scope}/nodes/{node}/tree

Parameters:
Name Type Description
parentnode_sid *
node_tree *
cb *

View Source infohub/Node.js, line 153

# async updateTree(parentnode_sid, node_tree, cb)

Update node tree. Keep existing nodes in parentnode_sid

PUT /{scope}/nodes/{node}/tree

Parameters:
Name Type Description
parentnode_sid *
node_tree *
cb *

View Source infohub/Node.js, line 126