Get App Resources by User and Organization¶
Get the list of permissions and menus that the user has permission to in the application. The user does not need to log in to Application Portal.
Prerequisites¶
The OU has obtained the application, or the application is a self-built application in the OU.
The user has the access permission with the corresponding permissions and menus for the application, otherwise the return result is empty.
Request Format¶
GET https://{apigw-address}/app-portal-service/v2.3/user/app/resource/permission
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
OU ID. How to get orgId >> |
userId |
Query |
Required |
String |
User ID. How to get userId >> |
appId |
Query |
Required |
String |
The access key of the application. How to get Access Key >> |
locale |
Query |
Optional |
String |
Specifies the language in which to return the list information. The following values are supported:
|
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
permissions |
Permission Struct |
List of permissions. Permission Struct >> |
menus |
Menu Struct |
List of menus. Menu Struct >> |
Permission Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
Permission ID. |
code |
String |
Permission code. |
name |
String |
Permission name. |
Error Codes¶
Error Code |
Description |
---|---|
31400 |
Possible causes: OU ID, user name, and email are required, or the application is invalid. |
31403 |
User does not have access to the application menus or permissions. |
31404 |
Non-existed OU or application, or application not acquired. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.3/user/app/resource/permission?orgId=your_org_id&appId=your_access_key&userId=your_user_id
method: GET
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"permissions": [
{
"id": "your_resource_id",
"code": "your_resource_code",
"name": "your_resource_name"
}
],
"menus": [
{
"id": "your_menu_id",
"code": "your_menu_code",
"name": "your_menu_name",
"url": "",
"displayOrder": 1,
"parentId": "",
"children": [
{
"id": "your_menu_id",
"code": "your_menu_code",
"name": "your_menu_name",
"url": "your_menu_url",
"displayOrder": 1,
"parentId": "your_parent_menu_id",
"children": []
},
{
"id": "your_menu_id",
"code": "your_menu_code",
"name": "your_menu_name",
"url": "your_menu_url",
"displayOrder": 2,
"parentId": "your_parent_menu_id",
"children": []
}
]
},
{
"id": "your_menu_id",
"code": "your_menu_code",
"name": "your_menu_name",
"url": "your_menu_url",
"displayOrder": 3,
"parentId": "",
"children": []
}
]
}
}