Update Organization Structure¶
Update organization structure nodes.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.3/structure/update
Request Parameters (Query)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Mandatory |
String |
OU ID |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
structureRootId |
Mandatory |
String |
The root node of the target organization structure |
structures |
Mandatory |
StructureUpdateDTO Struct |
Organization structure node list |
StructureUpdateDTO Struct¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
structureId |
Mandatory |
String |
Organization structure ID |
name |
Optional |
I18nString |
The updated node name. For more information on internationalized naming rules, see Internationalized name struct. |
tags |
Optional |
TagDTO Struct |
Organization structure node tags |
isTagIncrementalUpdate |
Optional |
Boolean |
Incremental update on tags or not, only available with tags specified: - True: default. Add the key-value pairs specified in the tags parameter - False: remove all key-value pairs except the pairs specified in the tags parameter |
TagDTO Struct¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
key |
Mandatory |
String |
Tag key |
value |
Mandatory |
string |
Tag value |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
boolean |
True for updated, false for failed to update |
Error Codes¶
Error Code |
Description |
---|---|
31400 |
Possible causes: invalid organization structure, nodes or tag name, non-existed node in the current organization structure, duplicated tag keys, etc. |
31403 |
The application does not have the access to the organization structure |
31404 |
OU does not exist |
31408 |
The organization structure node name already exists |
31430 |
Invalid name of organization structure node |
31432 |
The number of node tags exceeds the limit |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.3/structure/update
method: POST
requestBody:
{
"structureRootId": "your_structure_root_node_ID",
"structures": [
{
"structureId": "your_structure_id",
"name": {
"defaultValue": "Turbine1",
"i18nValue": {"zh_CN": "风机", "en_US": "Turbine"}
},
"isTagIncrementalUpdate": false,
"tags": [
{
"key": "k111",
"value": "v111"
},
{
"key": "k222",
"value": "v222"
}
]
},
{
"structureId": "your_structure_id",
"name": {
"defaultValue": "Turbine2"
}
}
]
}
Return Sample¶
{
"code": 0,
"data": true,
"message": "OK"
}