Skip to content

Service: User Group List (System Admin)

Eliza Margaretha edited this page Feb 20, 2023 · 16 revisions

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

Lists user-groups by username and user-group status. If username is not specified, user-groups of all users will be listed. If status is not specified, user-groups of all statuses will be listed.

This service is restricted only for system management purposes and only allowed for system admins. It requires admin authentication either by using Authorization header or including an admin token in the request body. At server starts-up, Kustvakt automatically generates an adminToken file at the root project folder, if it has not existed already.

Available in: full version

Method: POST

Service URL: root/admin/group/list

Parameters

Header Parameter

Name Required Authentication scheme Value
Content-Type yes content type of the input data application/x-www-form-urlencoded
Authorization yes, if adminToken is not included, see Form Parameters below HTTP authentication with scheme: Bearer OAuth2 access token

Form Parameters

Name Required Description Type Value
username no a username String
status no user-group status UserGroupStatus ACTIVE, DELETED, HIDDEN
token yes, if authorization header is not included The adminToken automatically generated by Kustvakt server in the root folder String

Examples

Request with admin token

curl -H 'Content-Type: application/x-www-form-urlencoded' -d @adminToken http://localhost:8089/api/v1.0/admin/group/list?username=pearl&status=HIDDEN'

Request with authorization header

curl -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9' 'http://localhost:8089/api/v1.0/admin/group/list?username=pearl&status=HIDDEN'

Request with Basic authentication (for testing only)

Username (admin) and password (password) are encoded in Base64 as the basic token.

Retrieve user-groups with status HIDDEN that belong to a user with username: pearl

curl -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' 'http://localhost:8089/api/v1.0/admin/group/list?username=pearl&status=HIDDEN'

Response

[{
    "id": 3,
    "name": "auto group",
    "owner": "system",
    "status": "HIDDEN",
    "members": [{
        "userId": "pearl",
        "status": "ACTIVE",
        "roles": ["VC_ACCESS_MEMBER"]
    }],
    "userMemberStatus": null,
    "userRoles": null
}]

User in userMemberStatus and userRoles refers to the user requesting the service. In this case, the user is the system admin. Since he/she is not a member of the user-group, the values of userMemberStatus and userRoles are null.

Advanced Setting

Developer Setting

Search services

Metadata services

Authentication and Authorization services

Client services

Super client services

Plugin services

User services

User group services

Virtual corpus services

Virtual corpus access services

Administrative services

Description services

Clone this wiki locally