Employee Identity (EIAM)
Get Organization List
API
# Permissions
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 |
|---|---|
| org_read | Read permission for organization management interfaces |
| all | Read and write permissions for all interfaces |
| read | Permission for all read interfaces |
# Request Specification
GET https://{your_domain}/api/v2/tenant/organizations?org_id=&all_child=false&offset=0&limit=10
# 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
None
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| org_id | Organization ID | No | String | Organization ID |
| all_child | Whether to get child organizations | No | Boolean | When true, only returns all child organizations; when false, only returns the root organization |
| updated_at_greater | Updated At Greater Than | No | String | Filter based on update time. Only records updated after this time will be returned. Format: yyyy-MM-dd HH:mm:ss |
| offset | Page Number | Yes | Int | Page Number |
| limit | Page Size | Yes | Int | Page Size, between 10-100 |
# Response Example
Success Example:
HTTP/1.1 200 OK
{
"total": 4,
"organizations": [
{
"org_id": "20220117125622909-9346-35755733F",
"parent_id": null,
"name": "sdk2e",
"category": "department",
"org_code": "10000",
"sequence": 5,
"disabled": false,
"created_at": "2022-08-01 10:00:00.111",
"updated_at": "2024-08-30 14:37:24.610",
"extension": {
"uid": "123"
}
},
{
"org_id": "20220412105608948-3B83-D566C6D94",
"parent_id": null,
"name": "Test Organization 1",
"category": "department",
"org_code": "TestOrg1",
"sequence": 5,
"disabled": false,
"created_at": "2022-08-01 10:00:00.111",
"updated_at": "2024-08-30 14:37:24.610",
"extension": {
"uid": "123"
}
},
{
"org_id": "20220412165706419-33A2-C80A351C1",
"parent_id": null,
"name": "Test Organization 2",
"category": "department",
"org_code": "TestOrg2",
"sequence": 5,
"disabled": false,
"created_at": "2022-08-01 10:00:00.111",
"updated_at": "2024-08-30 14:37:24.610",
"extension": {
"uid": "123"
}
},
{
"org_id": "20220331135144180-0FA5-EE3B69068",
"parent_id": null,
"name": "a",
"category": "department",
"org_code": "a",
"sequence": 5,
"disabled": false,
"created_at": "2022-08-01 10:00:00.111",
"updated_at": "2024-08-30 14:37:24.610",
"extension": {
"uid": "123"
}
}
]
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "ORG.0001",
"error_msg": "Organization does not exist"
}
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| total | Total Count | Int | Total Count |
| organizations | Organization Collection | List | Organization Collection |
| --org_id | Organization ID | String | Organization ID |
| --org_code | Organization Code | String | Organization Code |
| --name | Organization Name | String | Organization Name |
| --parent_id | Parent Node ID | String | Parent Node ID |
| --category | Organization Type | String | Organization Type |
| --sequence | Display Order | int | Display Order |
| --disabled | Is Disabled | Boolean | Is Disabled |
| --created_at | Organization Creation Time | String | Organization Creation Time |
| --updated_at | Organization Modification Time | String | Organization Modification Time |
| --extension | Extended Attributes | Map | Extended attributes, which need to be defined within the enterprise |
# Error Codes
| Status Code | Error Code | Error Message | Action |
|---|---|---|---|
| 400 | ORG.0001 | Organization does not exist | Please check if the corresponding organization exists |
| Organization does not exist | |||
| 400 | OAP.PAGE.0003 | The pagination page number does not meet the validation rules | Please check if the input pagination page number is correct |
| The pagination page number does not meet the verification rules |
