- Documentation
- Application
- Get App Menu and Permission
Get App Menu and Permission¶
Get the list of application menus and permissions.
Operation Permissions¶
User login to Application Portal is required.
Selecting an OU is required.
Prerequisites¶
The associated application has been acquired by the organization.
The user must have access permission for the application’s menus and permissions (otherwise the response 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) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
accessKey |
Query |
Mandatory |
String |
The service account of the application. The format of the parameter’s string is Bearer {your token}. The application authenticates with |
Request Parameters (Header)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Mandatory |
String |
The access token (or bearer token). The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The list of application menus and permissions |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
permissions |
Array of Permission Structs |
The list of permissions |
menus |
Array of Menu Structs |
The list of menus |
Permission Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The permission ID |
identifier |
String |
The permission identifier |
name |
String |
The permission name |
nameJson |
I18nString |
The permission name in multiple languages (json format) |
Menu Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The menu ID |
name |
String |
The menu name |
nameJson |
I18nString |
The menu name in multiple languages (json format) |
identifier |
String |
The menu identifier |
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 |
children |
Menu Struct |
The sub-menu |
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
requestHeader:
{
"Authorization":"yourBearerToken"
}
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": []
}
]
}
}