- Documentation
- Application
- Get App Menu and Permission
- Edit
Get App Menu and Permission¶
Get the list of application menus and permissions that the user has been assigned.
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 OU has obtained the application, or the application is a self-built application in the OU.
The user has access permission for the permissions and menus corresponding to the application, otherwise the return result is empty.
Request Format¶
GET https://{apigw-address}/app-portal-service/v2.2/user/app/resource/info
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
accessKey |
Query |
Required |
String |
The application’s |
Request Parameters (Header)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
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 |
---|---|---|
permissions |
Permission Struct |
The list of permissions. Permission Struct >> |
menus |
Menu Struct |
The list of menus. Menu Struct >> |
Permission Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The permission ID. |
identifier |
String |
The unique code of the permission. |
name |
String |
The permission name. |
nameJson |
I18nString |
The permission name in multiple languages. |
Menu Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The menu ID. |
identifier |
String |
The unique code of the menu. |
name |
String |
The menu name. |
nameJson |
I18nString |
The menu name in multiple languages. |
identifier |
String |
The menu ID. |
displayOrder |
Integer |
The display order of the menu. The value is an integer starting from 1. The smaller the number is, the higher the place on the menu list. |
url |
String |
The menu URL. |
parentId |
String |
The parent menu ID. |
children |
Menu Struct |
The details of the child menus. |
Error Codes¶
Code |
Description |
---|---|
31400 |
AccessKey is required |
31401 |
Access Token is invalid |
31403 |
No access to the application |
31404 |
The application does not exist, or is not acquired |
31512 |
Selecting an OU is required |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/app/resource/info?accessKey=app_1
method: GET
headers: {"Authorization":"Bearer your_token"}
Return Sample¶
{
"code": 0,
"message": "",
"data": {
"permissions": [
{
"id": "permissionKey",
"identifier": "permission",
"name": "permission",
"nameJson":{"default":"permission","en_Us":"permission", "zh_CN":"permission"},
}
],
"menus": [
{
"id": "accessKey",
"identifier": "menu",
"name": "menu",
"nameJson":{"default":"defName","en_Us":"enName", "zh_CN":"zhName"},
"url": "/a",
"displayOrder": 1,
"parentId": "",
"children": []
},
{
"id": "accessKey",
"identifier": "menu2",
"name": "menu2",
"nameJson":{"default":"defName","en_Us":"enName", "zh_CN":"zhName"},
"url": "/eos-wind-map/assetOverview.html",
"displayOrder": 2,
"parentId": "",
"children": []
}
]
}
}