Employee Identity (EIAM)
Add Application Account Roles
API
# Permissions {/examples/}
The Identity Management API is authorized at the application level. Before calling the interface, you need to set interface permissions for different applications. For details, please refer to API Permissions.
| Permission Code | Description |
|---|---|
| account_all | Read/write permission for account management interfaces |
| all | Read/write permission for all interfaces |
# Request Description {/examples/}
POST https://{your_domain}/api/v2/tenant/applications/{app_id}/accounts/{account_id}/member-role
# Request Headers {/examples/}
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Authorization | Yes | String | Format: Bearer {access_token} |
| Content-Type | Content Type | Yes | String | Fixed value: application/json; charset=utf-8 |
# Request Example {/examples/}
{
"role_ids": [
"20220415170305200-EF22-C2404E358",
"20220415170305223-7193-A01122B37"
]
}
1
2
3
4
5
6
2
3
4
5
6
# Request Parameters {/examples/}
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| app_id | Application ID | Yes | String | Target application ID |
| account_id | Application Account ID | Yes | String | Target account ID |
| role_ids | Application Role ID Collection | Yes | List | Maximum collection capacity is 50 |
# Response Example
Correct Example:
HTTP/1.1 200 OK
{
"success_list": [
"20220415170305200-EF22-C2404E358",
"20220415170305223-7193-A01122B37"
],
"fail_list": []
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": " APP.0001",
"error_msg": "Application does not exist"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Response Parameters
| Parameter | Chinese Name | Type | Description |
|---|---|---|---|
| success_list | Success Collection | List | Application Role ID Collection |
| fail_list | Failure Collection | List | Application Role ID Collection |
# Error Codes
| Status Code | Error Code | Error Message | Handling Suggestion |
|---|---|---|---|
| 400 | APP.OBJECTMODEL.0006 | Application role model is not enabled | Please check if the application role model is enabled |
| The application role model is not opened | |||
| 400 | APP.0001 | Application does not exist | Please check if the application has been deleted |
| App does not exist | |||
| 400 | APP.ACCOUNT.0028 | Application account does not exist | Please check if the application account has been deleted |
| App account does not exist | |||
| 400 | APP.ROLE.0004 | The current application does not allow one account to be authorized multiple roles | Please check the number of roles for the application account |
| The current application does not allow one account to be authorized to multiple roles |
Please provide the Markdown content you need translated.
