Skip to content

Service: User Group Retrieval (System Admin)

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

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

Retrieves a user group by group-name. This function is limited for system admins.

This service 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/{group-name}

Parameters

Header Parameter

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

Path Parameter

Name Required Description Type
group-name yes a group name String
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 -v -H 'Content-Type: application/x-www-form-urlencoded' 
     -d @adminToken
     'http://localhost:8089/api/v1.0/admin/group/@marlin-group'

Request with authorization header

curl -v -H 'Content-Type: application/x-www-form-urlencoded' 
     -H 'Authorization: Bearer f70p9lBCIufy_9LYEef2jQzJLlBMpc1egkv4dCBxcD3A'
     'http://localhost:8089/api/v1.0/admin/group/@marlin-group'

Request with Basic authentication (for testing only)

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

curl -v -H 'Content-Type: application/x-www-form-urlencoded' 
     -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' 
     'http://localhost:8089/api/v1.0/admin/group/@marlin-group'

Response

{
    "id": 1,
    "name": "marlin group",
    "owner": "marlin",
    "status": "ACTIVE",
    "members": [
        {
            "userId": "marlin",
            "status": "ACTIVE",
            "roles": [
                "USER_GROUP_ADMIN",
                "VC_ACCESS_ADMIN"
            ]
        },
        {
            "userId": "dory",
            "status": "ACTIVE",
            "roles": [
                "USER_GROUP_ADMIN",
                "VC_ACCESS_ADMIN"
            ]
        }
    ],
    "userMemberStatus": null,
    "userRoles": 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