TeamCity 2021.1 Help

Manage User Groups

This article lists REST API requests concerning user groups.

Get User Groups

To get all user groups, use:

GET http://<TeamCity Server host>:<port>/app/rest/userGroups

The endpoint responds with a Groups entity which contains instances of a Group entities.

Get User Group Details

A specific user group can be retrieved via:

GET http://<TeamCity Server host>:<port>/app/rest/userGroups/<groupLocator>

groupLocator is typed as UserGroupLocator.

Create User Group

To create a new user group, POST a Group entity to:

POST http://<TeamCity Server host>:<port>/app/rest/userGroups

Example payload:

<group key="key" name="groupName" description="description"> <users> <user username="username"/> </users> <roles> <role roleId="roleId"> </roles> </group>
{ "roles" : { "role" : [ "roleId": "roleId" ] }, "name" : "name", "description" : "description", "key" : "key", "users" : { "user" : [ { "username" : "username" } ] } }

Delete User Group

To delete a group, use the following request:

DELETE http://<TeamCity Server host>:<port>/app/rest/userGroups/<groupLocator>
Last modified: 14 October 2021