Get Structure by User


Get the organization structures that are available for user.

Request Format


GET https://{apigw-address}/app-portal-service/v2.2/structure-service/structures/user

Request Parameters (Header)


Name

Mandatory/Optional

Data Type

Description

locale

Optional

String

Language code.

  • en_US for English (default)

  • zh_CN for Simplified Chinese

  • es_ES for Spanish

  • ja_JP for Japanese

authorization

Optional

String

User access token. If not empty, return the assets and their parent nodes that are available for the user

Request Parameters (URI)


Name

Mandatory/Optional

Data Type

Description

appId

Mandatory

String

Application ID

orgId

Mandatory

String

OU ID

Response Parameters


Data Struct


Error Codes


Error Code

Description

31520

The OU does not purchase the application

31530

Auto-assign organization structure is disabled

31531

User does not have the permission of “assign organization structure to application”

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.2/structure-service/structures/user

method: GET

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": {
    "id": "sgxxxxxxxx1",
    "parentId": "",
    "name": "name1",
    "description": "",
    "tags": null,
    "displayOrder": 0,
    "assets": null,
    "children": [
      {
        "id": "sgxxxxxxxx2",
        "parentId": "sgxxxxxxxx1",
        "name": "name2",
        "description": "",
        "tags": {
          "key1": "value1"
        },
        "displayOrder": 0,
        "assets": null,
        "children": [
          {
            "id": "sgxxxxxxxxx3",
            "parentId": "sgxxxxxxxx2",
            "name": "name3",
            "description": "",
            "tags": {},
            "displayOrder": 0,
            "assets": null,
            "children": []
          }
        ]
      }
    ]
  }
}