Get Structure Asset


Get all the assets that the user can access under an organization structure.

Operation Permissions


  • User login to Application Portal is required.
  • Selecting an OU is required.

Request Format


POST https://{apigw-address}/app-portal-service/v2.2/structure/asset/list

Request Parameters(Header)


Name Mandatory/Optional Data Type Description
Authorization Mandatory String The access token (or bearer token). The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token

Request Parameters(Body)


Name Mandatory/Optional Data Type Description
structureIds Mandatory List<String> The list of organization structure IDs. Get the required organization structures by using the Get User Structures API
locale Mandatory java.util.Locale The language used to display the asset name and organization structure name. If unspecified, it is set to English by default

Response Parameters


Name Data Type Description
data List<StructureAssetDTO> The assets that the organization structure and its users can access

StructureAssetDTO Struct


Name Data Type Description
structureId String The organization structure ID
structureName String The organization structure name
assets List<AssetBaseDTO> The assets that the user can access under the organization structure

AssetBaseDTO Struct


Name Data Type Description
assetId String The asset ID
assetName String The asset name
displayOrder Integer The serial number of displayed order
structureNameJson I18nString The organization structure name in Json, supporting multiple languages
assetNameJson I18nString The organization structure description in Json, supporting 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": ""
}