Assign Assets to Organization Structure¶
Assign assets to Organization structure nodes.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.3/structure/asset/assign
Request Parameters (Query)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Mandatory |
String |
OU ID |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
structureId |
Mandatory |
String |
Organization structure node ID. |
assetIds |
Mandatory |
List <string> |
The asset IDs to be assigned. After calling, all assets specified by this parameter will be added to the node. For the assets already added to the node, the assets that are not specified by this parameter will be removed from the node. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
boolean |
True for assigned, false for failed to assign. |
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_structure_ID",
"assetIds": ["your_asset_id_1", "your_asset_id_2"]
}
Return Sample¶
{
"code": 0,
"data": true,
"message": "OK"
}