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) Mandatory/Optional Data Type Description
orgId Query Mandatory String The ID of the organization to which the user belongs to. How to get orgId>>
id Query Mandatory 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.

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
}