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. If unspecified, it is set to English by default.

  • en_US for English
  • zh_CN for Simplified Chinese
  • es_ES for Spanish
  • ja_JP for Japanese
  • de_DE for German
  • pl_PL for Polish
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


Name Data Type Description
data Data Struct Organization structure information.

Data Struct


Name Data Type Description
id String Organization structure ID.
parentId String Parent node ID.
name String Organization structure name.
description String Organization structure description.
displayOrder Integer Sort number.
children Data Struct Organization structure sub-node.

Error Codes


Error Code Description
31520 The OU does not acquire 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": "your_node_id",
    "parentId": "",
    "name": "your_node_name",
    "description": "",
    "tags": null,
    "displayOrder": 0,
    "assets": null,
    "children": [
      {
        "id": "your_node_id_2",
        "parentId": "your_parent_node_id",
        "name": "your_node_name_2",
        "description": "",
        "tags": {
          "key1": "value1"
        },
        "displayOrder": 0,
        "assets": null,
        "children": [
          {
            "id": "your_node_id_3",
            "parentId": "your_parent_node_id",
            "name": "your_node_name_3",
            "description": "",
            "tags": {},
            "displayOrder": 0,
            "assets": null,
            "children": []
          }
        ]
      }
    ]
  }
}