- Documentation
- User and Organization
- Update Application Authorization
Update Application Authorization¶
Update the API authorization information of an application in a specified OU.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.3/app/authorization/set
Request Parameters (Query)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Mandatory |
String |
OU ID. |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
appId |
Mandatory |
String |
Application ID |
dataAuthorizeType |
Mandatory |
Array |
The list of API authorization items. Leave it black to remove all authorized items from the application. You can enter the following authorization IDs: - USER for “Obtain the ID, username, email, and phone number of all users in the OU” - ASSET for “Obtain the ID and name of all assets in the OU” - ROLE for “Obtain the ID and name of all roles in the OU” - USER_OP for “Create or delete user accounts in the OU” - USER_PERMISSION for “Authorize users in the OU” - USER_ALL_PERMISSION for “Obtain all user permissions in the OU” - ROLE_OP for “Edit all roles in the OU” - MENU_GROUP_OP for “Edit all menu groups in the OU” |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
boolean |
The results of assigning or removing asset permissions, true for success and false for failure. |
Error Codes¶
Error Code |
Description |
---|---|
31400 |
Possible reasons are: - OU ID is required. - authorization type is invalid. - The target application is an application shortcut. - OU has no permission to access the application. |
31403 |
Service account has no permission to authorize applications. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.3/app/authorization/set
method: POST
requestBody:
{
"appId": "your_app_id",
"dataAuthorizeType":[
"ROLE", "USER_OP", "ASSET", "USER"
]
}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": true
}