Get Structure Asset¶
Get all the assets that the user can access under an organization structure.
Prerequisites¶
The user has logged in to Application Portal and entered an OU. You can log in to Application Portal through the Log In API and select the OU through the Choose Organization API.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/structure/asset/list
Request Parameters(Header)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Required |
String |
The access token generated after the user logs in and selects the OU, represented by Bearer Token, is in the form of |
Request Parameters(Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
structureIds |
Required |
Array |
The list of organization structure IDs. You can get the required organization structure IDs by using the Get User Structures API. |
locale |
Required |
String |
Specifies the language in which to return the list information. The following values are supported:
|
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
structureId |
String |
The organization structure ID. |
structureName |
String |
The organization structure name. |
structureNameJson |
I18nString |
The organization structure name in multiple languages. |
assets |
AssetBaseDTO Struct |
The assets that the user can access under the organization structure. AssetBaseDTO Struct >> |
AssetBaseDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
assetId |
String |
The asset ID. |
assetName |
String |
The default name of the asset. |
displayOrder |
Integer |
The serial number of displayed order. The smaller the number, the higher the order. |
assetNameJson |
I18nString |
The organization structure description in multiple languages. |
Error Codes¶
Code |
Description |
---|---|
31400 |
The structureIds or locale are empty, or the id is invalid |
31401 |
The access token is invalid |
31404 |
The application used does not exist in the organization |
31512 |
Selecting an OU is required |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/structure/asset/list
method: POST
headers: {"Authorization":"Bearer your_token"}
Return Sample¶
{
"code": 0,
"data": [
{
"assets": [
{"assetId": "your_asset_id_1","assetName": "Inverter1", "displayOrder": 0, "assetNameJson": {"default": "Inverter1"}},
{"assetId": "your_asset_id_2","assetName": "Inverter2", "displayOrder": 1, "assetNameJson": {"default": "Inverter2"}}
],
"structureId": "your_structure_id_1",
"structureName": "OrganizationA",
"structureNameJson": {"default": "OrganizationA"}
},
{
"assets": [
{"assetId": "your_asset_id_3","assetName": "Inverter3", "displayOrder": 0, "assetNameJson": {"default": "Inverter3"}},
{"assetId": "your_asset_id_4","assetName": "Inverter4", "displayOrder": 1, "assetNameJson": {"default": "Inverter4"}}
],
"structureId": "your_structure_id_2",
"structureName": "OrganizationB",
"structureNameJson": {"default": "OrganizationB"}
}
],
"message": ""
}