Employee Identity (EIAM)
Get User's Jobs
API
# Permissions {/permissions/}
The Identity Management API is authorized at the application dimension. Before calling the API, you need to set API permissions for different applications. For details, please refer to API Permissions.
| Permission Code | Description |
|---|---|
| user_all | Read and write permissions for user management APIs |
| user_read | Read permissions for user management APIs |
| all | Read and write permissions for all APIs |
| read | Permissions for all read APIs |
# Request Specification {/request-specification/}
GET https://{your_domain}/api/v2/tenant/users/{user_id}/jobs?relation_type=
# Request Headers {/request-headers/}
| 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 {/request-example/}
None
# Request Parameters {/request-parameters/}
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| user_id | User ID | Yes | String | |
| relation_type | Job Type | Yes | String | When empty, queries all types. 1 for primary job, 0 for part-time/concurrent jobs |
# Response Example
Correct Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"total": 3,
"jobs": [
{
"job_id": "20240326154025150-9E79-C9D5D9022",
"org_id": "20220825141325371-4D03-81EF80243",
"position_id": "20210529172248496-D329-5748DE918",
"title_id": "20230529172248496-D329-5748DE917",
"relation_type": 1
},
{
"job_id": "20240326154025150-9E79-C9D5D9033",
"org_id": "20220825141325371-4D03-81EF80244",
"position_id": "20210529172248496-D329-5748DE919",
"title_id": "20230529172248496-D329-5748DE920",
"relation_type": 0
},
{
"job_id": "20240326154025150-9E79-C9D5D9044",
"org_id": "20220825141325371-4D03-81EF80245",
"position_id": "20210529172248496-D329-5748DE921",
"title_id": "20230529172248496-D329-5748DE922",
"relation_type": 0
},
]
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_msg": "用户不存在",
"error_code": "USER.0001"
}
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
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
# Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| total | Total Count | int | |
| jobs | User Job Collection | List | |
| --job_id | Job ID | String | |
| --org_id | Organization ID | String | |
| --position_id | Position ID | String | |
| --title_id | Title ID | String | |
| --relation_type | Job Type | String | 1 for primary job, 0 for part-time/concurrent job |
# Error Codes
| Status Code | Error Code | Error Message | Action |
|---|---|---|---|
| 400 | ENT.CONFIG.0031 | 任职管理功能未开启,请先开启此功能 | 请先在企业中心开启任职管理 |
| The job management function is not enabled, please enable this function first | |||
| 400 | OAP.PARAM.0004 | 参数[{0}]不符合校验规则 | 请检查入参是否符合校验规则 |
| Parameter [{0}] does not comply with validation rules | |||
| 400 | USER.0001 | 用户不存在 | 请检查对应用户是否存在 |
| User does not exist |
