Delete Asset Tree¶
Delete an asset tree.
Operation Permissions¶
| Required Authorization | Required Operation Permission | 
|---|---|
| Asset Tree Management | Full Access | 
Prerequisite¶
Ensure that there are no child nodes under the asset tree before deleting.
Request Format¶
POST https://{apigw-address}/asset-tree-service/v2.1/asset-trees?action=delete
Request Parameters (URI)¶
| Name | Location (Path/Query) | Mandatory/Optional | Data Type | Description | 
|---|---|---|---|---|
| orgId | Query | Mandatory | String | The organization ID which the asset belongs to. How to get orgId>> | 
| treeId | Query | Mandatory | String | The asset tree ID. How to get treeId>> | 
Error Codes¶
| Code | Message | Description | 
|---|---|---|
| 17404 | TreeId is not exist | The tree ID does not exist. | 
| 17800 | Query it has sub nodes when delete node | Nodes with child nodes cannot be deleted. | 
| 99400 | Invalid arguments | The request parameter is invalid. Check the request parameters. | 
| 99500 | System error | Internal server error. Contact EnOS support. | 
Samples¶
Request Sample¶
url: https://{apigw-address}/asset-tree-service/v2.1/asset-trees?action=delete&orgId=yourOrgId&treeId=H4yVDl2U
method: POST
Return Sample¶
{
  "code": 0,
  "msg": "OK",
  "requestId": "01b5477a-374e-49a0-8b68-7dbfe8f0b74f",
  "data": null
}