Get Structure by Detail


Get all organization structure nodes assigned to an application.

Request Format


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

Request Parameters (Header)


Name

Required/Optional

Data Type

Description

locale

Optional

String

Specifies the language in which to return the list information. The following values ​​are supported:

  • en_US: English

  • zh_CN: Chinese

  • es_ES: Spanish

  • ja_JP: Japanese

  • de_DE: German

  • pl_PL: Polish

By default, the list information in English en_US is returned.

authorization

Optional

String

The access token generated after the user logs in and selects the OU, represented by Bearer Token, is in the form of Bearer {your token}. If not specified, all organization structure nodes mounted under the application are returned. If specified, the visible organization structure nodes of the user under the application is returned. The user needs to be logged in. You can call the Log In or Refresh Access Token API to obtain the access token.

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

structureRootId

Query

Required

String

The root node ID of the organization structure.

appId

Query

Required

String

The access key of the application. How to get Access Key >>

orgId

Query

Required

String

OU ID. How to get orgId >>

needAssociatedAsset

Query

Optional

Boolean

Whether to return the resource information associated to the organization structure node. Supports the following values:

  • true: to return.

  • false: not to return.

Default is false.

Response Parameters


Name

Data Type

Description

id

String

Node ID.

parentId

String

Parent node ID.

name

String

Organization structure name.

description

String

Organization structure description.

displayOrder

Integer

Sort number. The smaller the number, the higher the node.

tags

Object

The tags of the organization structure.

assets

AssetDTO Struct

Asset information mounted on the current node. AssetDTO Struct >>

children

Data Struct

The information of sub-nodes. Includes id, parentId, name, description, displayOrder, tags, assets and children.

associatedResources

Data Struct

The resource associated with the node. Includes id, parentId, name, description, displayOrder, tags, assets and children.

AssetDTO Struct


Name

Data Type

Description

assetId

String

Asset ID.

assetName

String

Asset name.

displayOrder

Integer

Sort number. The smaller the number, the higher the asset.

assetNameJson

Object

Asset name, supporting internationalization.

Error Codes


Error Code

Description

31404

Organization structure is not assigned to the application.

31520

The OU does not obtain the application.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/structure-service/structures/detail?structureRootId=yourRootNodeId&appId=yourAccessKey&orgId=yourOrgId

method: GET

Return Sample


{
    "code": 0,
    "data": {
        "children": [
            {
                "assets": [
                    {
                        "assetId": "your_resource_id_1",
                        "assetNameJson": {
                            "default": "your_resource_name_1",
                            "zh_CN": "your_resource_name_zh_1"
                        },
                        "displayOrder": 0,
                        "assetName": "your_resource_name_1"
                    }
                ],
                "children": [
                    {
                        "assets": [
                            {
                                "assetId": "your_resource_id_2",
                                "assetNameJson": {
                                    "default": "your_resource_name_2"
                                },
                                "displayOrder": 0,
                                "assetName": "your_resource_name_2"
                            },
                            {
                                "assetId": "your_resource_id_3",
                                "assetNameJson": {
                                    "default": "your_resource_name_3"
                                },
                                "displayOrder": 0,
                                "assetName": "your_resource_name_3"
                            }
                        ],
                        "children": [],
                        "name": "your_node_name_1",
                        "displayOrder": 0,
                        "description": "",
                        "id": "your_node_id",
                        "parentId": "your_parent_node_id",
                        "tags": {}
                    }
                ],
                "name": "your_node_name_2",
                "displayOrder": 0,
                "description": "",
                "id": "your_node_id_2",
                "parentId": "your_parent_node_id",
                "tags": {}
            }
        ],
        "name": "your_node_name_3",
        "displayOrder": 0,
        "description": "",
        "id": "your_node_id_3",
        "parentId": "",
        "tags": {
            "key1": "value1"
        }
    },
    "message": "OK"
}