Assign Assets to Organization Structure¶
Assign assets to an organization structure node.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.3/structure/asset/assign
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
OU ID. How to get orgId >> |
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
structureId |
Required |
String |
The organization structure node ID. |
assetIds |
Required |
Array |
The asset IDs to be assigned. All specified assets will be assigned to the organization structure node. If there are already assets assigned on the node, but this parameter is not specified, the assets will be removed from the node. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
boolean |
Whether the asset is assigned successfully. |
Error Codes¶
Error Code |
Description |
---|---|
31400 |
Required parameters are missing. |
31403 |
The organization structure is not assigned to applications. |
31404 |
The organization structure node or assets do not exist. |
31435 |
The asset is already added to the organization structure. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.3/structure/asset/assign
method: POST
requestBody:
{
"structureId": "your_node_ID",
"assetIds": ["your_asset_id_1", "your_asset_id_2"]
}
Return Sample¶
{
"code": 0,
"data": true,
"message": "OK"
}