Employee Identity (EIAM)

Query Application-side Role List

API

# Permissions

The Identity Management APIs are authorized at the application level. Before calling an API, you need to set API permissions for different applications. For details, please refer to API Permissions.

Permission Code Description
app_role_read Read permission for application-side role APIs
read Permission for all read APIs
all Read and write permissions for all APIs

# Request Description

GET https://{your_domain}/api/v2/tenant/applications/{application_id}/app-roles?offset=0&limit=10

# Request Headers

Parameter 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

None

# Request Parameters

Parameter Chinese Name Required Type Description
application_id Application ID Yes String Target application ID
offset Page Number Yes Int Starts from page 0
limit Items per Page Yes Int Number per page, between 1-50

# Return Example

Correct Example:
HTTP/1.1 200 OK
{
    "total": 3,
    "offset": 0,
    "limit": 10,
    "roles": [
        {
            "id": "20220415170305200-EF22-C2404E358",
            "code": "role1",
            "name": "role1",
            "parentId": null,
            "sequence": 1,
            "description": null,
            "disabled": false,
            "remoteId": "role1"
        },
        {
            "id": "20220415170305223-7193-A01122B37",
            "code": "role2",
            "name": "role2",
            "parentId": null,
            "sequence": 2,
            "description": null,
            "disabled": false,
            "remoteId": "role2"
        },
        {
            "id": "20220420144449385-C66D-E8C1D1D79",
            "code": "admin",
            "name": "管理员",
            "parentId": null,
            "sequence": 3,
            "description": null,
            "disabled": false,
            "remoteId": "admin"
        }
    ]
}


Error Example:
HTTP/1.1 400 Bad Request
{
    "error_code": "TENANT-COMMON-0005",
    "error_msg": "参数错误,limit:最大不能超过50."
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

# Return Parameters

Parameter Name Chinese Name Type Description
total Total Count Int
offset Page Number Int
limit Page Size Int
roles Role Collection List
--id Role ID String
--code Role CODE String
--name Role Name String
-- parentId Parent Role ID String
--sequence Sequence String
--description Description String
--disabled Disabled String
--remoteId Role ID in Downstream Application String