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 Asset Tree

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 Asset Tree and Associate Asset

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 Asset Tree

Delete an asset tree

/asset-tree-service/v2.1/asset-trees?action=delete

×

Get Asset Tree

Get the details of an asset tree

/asset-tree-service/v2.1/asset-trees?action=get

Search Asset Tree

Search for asset trees based on the search criteria

/asset-tree-service/v2.1/asset-trees?action=search

Update Asset Tree

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

Associate Asset

Link an existing asset to an asset tree

/asset-tree-service/v2.1/asset-nodes?action=associateAsset

×

Batch Associate Asset

Batch link existing assets to an asset tree

/asset-tree-service/v2.1/asset-nodes?action=associateAssetBatch

×

Create and Associate Asset

Create an asset and link it to an asset tree

/asset-tree-service/v2.1/asset-nodes?action=createAsset

×

Move Asset Node

Move an asset node and its descendant nodes to a specified location

/asset-tree-service/v2.1/asset-nodes?action=move

×

Delete Asset Node

Remove an asset from an asset tree

/asset-tree-service/v2.1/asset-nodes?action=delete

×

Get Asset Trees

Get the details of one or multiple asset trees based on a set of assetIds

/asset-tree-service/v2.1/asset-nodes?action=getAssetTree

Search Asset Node

Search for assets based on the search criteria

/asset-tree-service/v2.1/asset-nodes?action=searchAsset

Search Related Asset Node

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 Asset Path

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: