Get Structure by User¶
Get the organization structures that are available for a user in an application.
Prerequisites¶
The user has logged in to Application Portal and entered an OU. You can log in to Application Portal through the Log In API and select the OU through the Choose Organization API.
The user and the application have been associated with at least one organization structure. If necessary, contact the OU administrator to assign the organization structures.
Request Format¶
GET https://{apigw-address}/app-portal-service/v2.2/structure-service/structures/user
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 >> |
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:
|
authorization |
Required |
String |
The access token generated after the user logs in and selects the OU, represented by Bearer Token, is in the form of |
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. |
children |
Data Struct |
The sub-nodes. Includes |
Error Codes¶
Error Code |
Description |
---|---|
31520 |
The OU does not acquire the application. |
31530 |
Auto-assign organization structure is disabled. |
31531 |
The organization structure is not assigned to the user. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/structure-service/structures/user?orgId=yourOrgId&appId=yourAppId
method: GET
headers: {"Authorization":"Bearer your_token"}
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": []
}
]
}
]
}
}