Skip to content

Service: User Group List

Eliza Margaretha edited this page Jan 30, 2019 · 17 revisions

** WARNING: This service is experimental and may change without any notice.

Lists all user-groups in which a user is an active or a pending member. Information about members of a user-group is restricted only to active members with USER_GROUP_ADMIN role.

Available in: full version

Method: GET

Service URL: root/group/list

Parameters

Header Parameter

Name Required Authentication scheme Value
Authorization yes HTTP authentication with scheme: Api user authentication token

Examples

Request with cURL:

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1MzI3O
       TAxMzQsInN1YiI6InVzZXJuYW1lIiwiaXNzIjoiaHR0cDpcL1wva29yYXAuaWRzLW1
       hbm5oZWltLmRlIn0.p4jHIGeVwTpYAPFiWAd0R8Zcazyg7e9_tUGxOyFGUlo' 
      http://localhost:8089/api/group/list

Request with Basic authentication (for testing only):

Retrieve user-groups of marlin

curl -H 'Authorization: Basic bWFybGluOnBhc3N3b3Jk' 
      http://localhost:8089/api/group/list

Response

Since marlin has member status PENDING and does not have any role in dory group, members of dory group are not shown. User in userMemberStatus and userRoles refers to the user requesting the service. In this example, they describe marlin's member status and roles in the corresponding user-groups.

[
    {
        "id": 1,
        "name": "marlin group",
        "owner": "marlin",
        "members": [
            {
                "userId": "marlin",
                "status": "ACTIVE",
                "roles": [
                    "USER_GROUP_ADMIN",
                    "VC_ACCESS_ADMIN"
                ]
            },
            {
                "userId": "dory",
                "status": "ACTIVE",
                "roles": [
                    "USER_GROUP_ADMIN",
                    "VC_ACCESS_ADMIN"
                ]
            }
        ],
        "userMemberStatus": "ACTIVE",
        "userRoles": [
            "USER_GROUP_ADMIN",
            "VC_ACCESS_ADMIN"
        ]
    },
    {
        "id": 2,
        "name": "dory group",
        "owner": "dory",
        "userMemberStatus": "PENDING",
        "userRoles":[]
    }
]
Clone this wiki locally