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 APP_PORTAL_S_TDKKeqfYBK3m5z3LRgKVqThWDYnRBN44"}

Return Sample


{
  "code": 0,
  "data": [
      {
        "assets": [
                      {"assetId": "3rV4rzfF","assetName": "Inverter1", "displayOrder": 0, "assetNameJson": {"default": "Inverter1"}},
                      {"assetId": "2rVQ6ze4","assetName": "Inverter2", "displayOrder": 1, "assetNameJson": {"default": "Inverter2"}}
                    ],
        "structureId": "sg15941063016501",
        "structureName": "OrganizationA",
        "structureNameJson": {"default": "OrganizationA"}
      },
      {
        "assets": [
                      {"assetId": "2rd66fd3","assetName": "Inverter3", "displayOrder": 0, "assetNameJson": {"default": "Inverter3"}},
                      {"assetId": "2rVQ6zfF","assetName": "Inverter4", "displayOrder": 1, "assetNameJson": {"default": "Inverter4"}}
                    ],
        "structureId": "sg15941063016711",
        "structureName": "SOHO",
        "structureNameJson": {"default": "SOHO"}
      }
    ],
  "message": ""
}