Classes
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 |
# async getNodeData(node_sid, query, cb) → {Promise.<RestResponse>}
Parameters:
| Name | Type | Description |
|---|---|---|
node_sid |
*
|
|
query |
*
|
|
cb |
*
|
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 |
*
|
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
|
}} |
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 |
*
|
# 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 |
*
|