Skip to content

Service: User Group Creation

Eliza Margaretha Illig edited this page Mar 27, 2025 · 22 revisions

** WARNING: Member invitation and VC access are DEPRECATED from Kustvakt version 0.75 and will be completely removed in API v1.1.

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

Creates a user group with the group creator (the authenticated user) as the only member, or updates the user-group if it exists. In the service URL, groupName is marked with @ as a prefix. If the specified user-group exists, the service returns HTTP status 204 No Content, otherwise 201 Created.

A group creator is the group owner and automatically granted with the GROUP_ADMIN role. Group admins have privileges to manage group members and virtual corpora, such as listing members, grant the admin role to a member, and sharing a virtual corpus to the group.

Available in: full version

Method: PUT

Service URL: root/group/@{groupName}

Parameters

Header Parameters

Name Required Description Value
Authorization yes HTTP authentication with scheme: Bearer OAuth2 access token
Content-Type yes content type of the input data application/x-www-form-urlencoded

Path Parameters

Name Required Description Type
groupName yes user-group name consisting only of alphabets, underscores, dashes or fullstops String

URL Encoded Parameters

Name Required Description Type
description no description about the group String

Response Codes

HTTP Status Code Description
201 Created when creating a new user-group
204 No Content when updating an existing user-group
400 Bad request when group name is invalid
401 Unauthorized when the operation is not permitted because, for instance, user doesn't log in
415 Unsupported media types when content-type is not specified or the request method is incorrect

Examples

Request with cURL

curl --request PUT -H 'Content-Type: application/x-www-form-urlencoded' 
     -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1Mz' 
     -d 'description=people working on the KorAP project'
      http://localhost:8089/api/v1.0/group/@korap-group

Request with Basic authentication (for testing only)

curl --request PUT -H 'Content-Type: application/x-www-form-urlencoded' 
     -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' 
     -d 'description=a group of people working on the KorAP project'
      http://localhost:8089/api/v1.0/group/@korap-group
Clone this wiki locally