Get Structure by App


Get the organization structure root node assigned to an application.

Request Format


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

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 structures mounted under the application are returned. If specified, the visible organization structures 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

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 >>

Response Parameters


Name

Data Type

Description

id

String

Root node ID of the organization structure.

parentId

String

Parent node ID of the organization structure. This API only returns the root nodes of the organization structures, so the value of parentId is fixed to be empty.

name

String

Organization structure name.

description

String

The description of the organization structure.

displayOrder

Integer

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

tags

Object

The tag of the organization structure.

Error Codes


Error Code

Description

31520

The OU does not acquire the application.

Samples

Request Sample


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

method: GET

Return Sample


{
    "code": 0,
    "data": [
        {
            "name": "your_structure_name",
            "displayOrder": 0,
            "description": "",
            "id": "your_structure_id",
            "parentId": "",
            "tags": {
                "key1": "value1"
            }
        }
    ],
    "message": "OK"
}