-
Notifications
You must be signed in to change notification settings - Fork 3
Service: User Group Retrieval (System Admin)
Eliza Margaretha edited this page Feb 20, 2023
·
10 revisions
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}
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 |
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
}
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting a test environment
- HTTP Basic Authentication
- OAuth2 authorization scopes
- OAuth2 authorization request
- OAuth2 token request
- OAuth2 token revocation
- OAuth2 client registration
- OAuth2 client info
- OAuth2 client deregistration
- OAuth2 client secret reset
- Plugin registration
- Plugin list (marketplace)
- Plugin installation
- Plugin uninstallation
- Installed plugin list
- VC creation and update
- VC deletion
- VC list
- VC info
- VC KoralQuery
- VC statistics
- VC statistics with KoralQuery