List User Groups by User¶
List the user groups that the user has joined in the current organization.
Operation Permissions¶
Applications assigned with the administrator policy in the OU.
Request Format¶
GET https://{apigw-address}/enos-iam-service/v2.3/user/usergroup/list
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
The ID of the OU to which the user belongs to. How to get orgId>> |
id |
Query |
Required |
String |
The user ID. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Array of UserGroupInfo Structs |
The list of user groups that the user has joined. For more information, see UserGroupInfo Struct. |
UserGroupInfo Struct ¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The user group ID. |
name |
String |
The user group name. |
users |
Array of User Structs |
An unused parameter, usually blank. |
policys |
Array of Policy Structs |
The list of policies. For more information, see Policy Struct. |
user_num |
Integer |
The number of users in the user group. |
created_by |
String |
The username of the user who created the user group. |
Policy Struct ¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The policy ID. |
code |
String |
The policy code. |
desc |
String |
The policy description. |
name |
String |
The policy name. |
type |
Integer |
|
created_by |
String |
The username of the user who created the policy. |
permissions |
Map |
An unused parameter, usually blank. |
updated_at |
String |
An unused parameter, usually null. |
Samples¶
Request Sample¶
url: https://{apigw-address}/enos-iam-service/v2.3/user/usergroup/list?orgId=yourOrgId&id=yourRequestedUserId
method: GET
Return Sample¶
{
"fail": false,
"data": [
{
"id": "userGroupId1",
"name": "Admin group 1",
"users": [],
"policys": [],
"user_num": 1,
"created_by": "testUser"
},
{
"id": "userGroupId2",
"name": "Admin group 2",
"users": [],
"policys": [
{
"id": "289",
"code": "",
"desc": "Policy description",
"name": "Policy Name",
"type": 2,
"created_by": "john.doe",
"permissions": {}
}
],
"user_num": 2,
"created_by": "john.doe"
}
],
"success": true,
"status": 0
}