Update Asset Tree¶
Update the information of an asset tree.
Operation Permissions¶
Ensure that you have the permission to invoke this API. For more information, see Getting API Calling Permissions.
Request Format¶
POST https://{apigw-address}/asset-tree-service/v2.1/asset-trees?action=update
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
The OU ID which the asset belongs to. How to get orgId>> |
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
treeUpdateInfo |
Required |
TreeUpdateVo Struct |
The details to be provided when updating an asset tree. For more information, see TreeUpdateVo Struct>> |
TreeUpdateVo Struct ¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
treeId |
Required |
String |
The asset tree ID. |
name |
Required if |
StringI18n |
Specify the asset tree’s name in its respective locale’s language. For more information, see Internationalized name struct. |
tags |
Required if |
Tag Struct |
User-defined tags. (The Key and Value are of String type.) For more information, see How to use tags>> |
Error Codes¶
Code |
Message |
Description |
---|---|---|
99400 |
Invalid arguments |
The request parameter is invalid. Check the request parameters. |
99500 |
System error |
Internal server error. Contact the system administrator. |
Samples¶
Request Sample¶
url: https://{apigw-address}/asset-tree-service/v2.1/asset-trees?action=update&orgId=yourOrgId
method: POST
requestBody:
{
"treeUpdateInfo":{
"treeId": "yourTreeId",
"name": {
"defaultValue": "Tree Name",
"i18nValue":{
"en_US":"EN Tree Name",
"zh_CN":""
}
},
"tags":{
"tag1":"Tag 1"
}
}
Return Sample¶
{
"code": 0,
"msg": "OK",
"requestId": "01b5477a-374e-49a0-8b68-7dbfe8f0b74f",
"data": null
}
SDK Samples¶
You can access the SDK samples for Asset Tree Service on GitHub: