Asset Tree Service Overview¶
An asset tree is a method of organizing the hierarchical relationships between assets. For more information on asset trees, see Asset Tree Overview.
Through Asset Tree Service APIs, device managers can create, update, delete, and query the asset tree and its nodes. For a complete list of interfaces and functional descriptions of Asset Tree Service APIs, see API List.
Prerequisites¶
Ensure that you have obtained a service account, and the service account has the permission to call Asset Tree Service APIs. For more information, see Getting API Calling Permissions.
Ensure that you have read the limitations for asset trees. See Limitations.
API List
¶
You can see what operations can be used via these APIs, the URL corresponding to each operation, and whether it is applicable to EnOS Cloud and EnOS Edge in the following table.
Asset Tree¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Create an asset tree and a logical asset, and link the asset to the root node of the asset tree |
/asset-tree-service/v2.1/asset-trees?action=create |
√ |
× |
|
Create an asset tree and link an existing asset as the root node of the asset tree |
/asset-tree-service/v2.1/asset-trees?action=associate |
√ |
× |
|
Delete an asset tree |
/asset-tree-service/v2.1/asset-trees?action=delete |
√ |
× |
|
Get the details of an asset tree |
/asset-tree-service/v2.1/asset-trees?action=get |
√ |
√ |
|
Search for asset trees based on the search criteria |
/asset-tree-service/v2.1/asset-trees?action=search |
√ |
√ |
|
Update the information of an asset tree |
/asset-tree-service/v2.1/asset-trees?action=update |
√ |
× |
Asset Tree Node¶
Operation Name |
Description |
URL |
EnOS Cloud |
EnOS Edge |
---|---|---|---|---|
Link an existing asset to an asset tree |
/asset-tree-service/v2.1/asset-nodes?action=associateAsset |
√ |
× |
|
Batch link existing assets to an asset tree |
/asset-tree-service/v2.1/asset-nodes?action=associateAssetBatch |
√ |
× |
|
Create an asset and link it to an asset tree |
/asset-tree-service/v2.1/asset-nodes?action=createAsset |
√ |
× |
|
Move an asset node and its descendant nodes to a specified location |
/asset-tree-service/v2.1/asset-nodes?action=move |
√ |
× |
|
Remove an asset from an asset tree |
/asset-tree-service/v2.1/asset-nodes?action=delete |
√ |
× |
|
Get the details of one or multiple asset trees based on a set of |
/asset-tree-service/v2.1/asset-nodes?action=getAssetTree |
√ |
√ |
|
Search for assets based on the search criteria |
/asset-tree-service/v2.1/asset-nodes?action=searchAsset |
√ |
√ |
|
Search for assets under the specified asset tree based on the relationship with a known asset |
/asset-tree-service/v2.1/asset-nodes?action=searchRelatedAsset |
√ |
√ |
|
Search for paths on the asset tree |
/asset-tree-service/v2.1/asset-paths?action=search |
√ |
√ |
SDK Samples¶
You can access the SDK samples for Asset Tree Service on GitHub: