Classes
Methods
# async createObject(object_data, parent_sid, cb) → {Promise.<ApiResponse>}
Create new object on infohub.
Create a new object if object_id (in 'info') does not exist, create a new version if object_id exist.
Function uses endpoint POST .../{scope}/nodes/{node} on service 'hub'.
Parameters:
| Name | Type | Description |
|---|---|---|
object_data |
object
|
Object in GOM format. |
parent_sid |
string
|
|
cb |
function
|
Returns AüiResponse object with an cnObject as data if REST call has been sucessful |
- Since:
- 1.0, 09.2025, jh
Since this uses a callback, the function itself resolves with no value
Promise.<ApiResponse>
# async deleteObject(object_id, parent_sid, cb) → {Promise.<ApiResponse>}
Delete Object including all its versions in parent object 'parent_sid'.
Parameters:
| Name | Type | Description |
|---|---|---|
object_id |
string
|
|
parent_sid |
string
|
|
cb |
function
|
- Since:
- 1.0, 09.2025, jh
Since this uses a callback, the function itself resolves with no value
Promise.<ApiResponse>
# 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 getObject(object_id, cb, context_sidopt) → {Promise.<ApiResponse>}
Fetch an object by ID and (optional) context.
If context node is null the current project as used as context (root node for search).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
object_id |
string
|
The ID of the object to retrieve |
||
cb |
function
|
Callback function that receives the result object, { data: cnObject } |
||
context_sid |
string
|
<optional> |
null | Optional session or context identifier |
- Since:
- 1.0, 09.2025, jh
Since this uses a callback, the function itself resolves with no value
Promise.<ApiResponse>
# async getObjects(query, cb, context_sidopt) → {Promise.<ApiResponse>}
Fetch objects by query and (optional) context.
If context node is null use project as a context (root node for search).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
query |
object
|
Query for search |
||
cb |
function
|
Callback function that receives the result object |
||
context_sid |
string
|
<optional> |
null | Optional session or context identifier |
- Since:
- 1.0, 09.2025, jh
Since this uses a callback, the function itself resolves with no value.
Array
Promise.<ApiResponse>
Example
{
"object_list" : [ 'objid1' , 'objid2' , ... ] // optional
// parameters of webservice
"filter" :
"members" :
"properties" :
"geometry" :
"nodes" :
"relations" :
"relations_right" :
}
# newObjectFromJson(node_json) → {cnObject}
Factory method to instantiate a new object of class cnObject.
The object is not created or written to infohub. To save the object on infohub
use method saveObject().
Parameters:
| Name | Type | Description |
|---|---|---|
node_json |
object
|
Object as json in GOM format |
New Object
# async saveObject(cnObj, members, cb) → {Promise.<ApiResponse>}
Save object on infohub.
Take 'info' block of object (GOM) into account.
Use object_id to create a new or update an existing object,
Use parent_shortid as parent to create a new object or identify an existing object.
If also parent_shortid is missing, use project_shortid or catalogue_shortid as parent.
In any other cases the object is created in the current project stored in the Context object of this object service.
PUT - /{scope}/objects/{parent}/object
Parameters:
| Name | Type | Description |
|---|---|---|
cnObj |
cnObject
|
|
members |
Array
|
null
|
Save/Write these members which is one of [ 'info' , 'properties' , etc. ] |
cb |
function
|
- Since:
- 1.0, 09.2025, jh
Since this uses a callback, the function itself resolves with no value
Promise.<ApiResponse>
# async setPropertyValues(node_sid, propertylist, cb, cmt) → {Promise.<ApiResponse>}
Set property values in propertylist for node (shortid) on infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
node_sid |
*
|
Node ShortID |
propertylist |
*
|
= [ { 'typeid' : "abc##xs:string", 'value' : "123 abc", 'comment' : "Gesetzt durch xyz" } ] |
cb |
*
|
Call Back { ApiResponse<> } |
cmt |
*
|
Comment (optional) |
- Since:
- 1.0, 09.2025, jh
Since this uses a callback, the function itself resolves with no value.
Promise.<ApiResponse>