TeamCity REST API Reference 2023.05 Help

UserApi

getAllUsers

Get all users.

Endpoint

/app/rest/users

Produces

  • application/xml

  • application/json

Parameters

  • locator: string

  • fields: string

Response

Users

addUser

Create a new user.

Endpoint

/app/rest/users

Consumes

  • application/xml

  • application/json

Produces

  • application/xml

  • application/json

Parameters

  • body: User

  • fields: string

Response

User

deleteUser

Delete user matching the locator.

Endpoint

/app/rest/users/{userLocator}

Parameters

getUser

Get user matching the locator.

Endpoint

/app/rest/users/{userLocator}

Produces

  • application/xml

  • application/json

Parameters

Response

User

replaceUser

Update user matching the locator.

Endpoint

/app/rest/users/{userLocator}

Consumes

  • application/xml

  • application/json

Produces

  • application/xml

  • application/json

Parameters

Response

User

removeUserRememberMe

Remove the RememberMe data of the matching user.

Endpoint

/app/rest/users/{userLocator}/debug/rememberMe

Produces

  • text/plain

Parameters

getAllUserGroups

Get all groups of the matching user.

Endpoint

/app/rest/users/{userLocator}/groups

Produces

  • application/xml

  • application/json

Parameters

Response

Groups

setUserGroups

Update groups of the matching user.

Endpoint

/app/rest/users/{userLocator}/groups

Consumes

  • application/xml

  • application/json

Produces

  • application/xml

  • application/json

Parameters

Response

Groups

removeUserFromGroup

Remove the matching user from the specific group.

Endpoint

/app/rest/users/{userLocator}/groups/{groupLocator}

Parameters

  • userLocator: string<UserLocator>

  • groupLocator: string

  • fields: string

getUserGroup

Get a user group of the matching user.

Endpoint

/app/rest/users/{userLocator}/groups/{groupLocator}

Produces

  • application/xml

  • application/json

Parameters

  • userLocator: string<UserLocator>

  • groupLocator: string

  • fields: string

Response

Group

getUserPermissions

Get all permissions effective for the matching user.

Endpoint

/app/rest/users/{userLocator}/permissions

Produces

  • application/xml

  • application/json

Parameters

Response

PermissionAssignments

getUserProperties

Get all properties of the matching user.

Endpoint

/app/rest/users/{userLocator}/properties

Produces

  • application/xml

  • application/json

Parameters

Response

Properties

removeUserProperty

Remove a property of the matching user.

Endpoint

/app/rest/users/{userLocator}/properties/{name}

Parameters

getUserProperty

Get a property of the matching user.

Endpoint

/app/rest/users/{userLocator}/properties/{name}

Produces

  • text/plain

Parameters

Response

string

setUserProperty

Update a property of the matching user.

Endpoint

/app/rest/users/{userLocator}/properties/{name}

Consumes

  • text/plain

Produces

  • text/plain

Parameters

Response

string

getAllUserRoles

Get all user roles of the matching user.

Endpoint

/app/rest/users/{userLocator}/roles

Produces

  • application/xml

  • application/json

Parameters

Response

Roles

addRoleToUser

Add a role to the matching user.

Endpoint

/app/rest/users/{userLocator}/roles

Consumes

  • application/xml

  • application/json

Produces

  • application/xml

  • application/json

Parameters

Response

Role

setUserRoles

Update user roles of the matching user.

Endpoint

/app/rest/users/{userLocator}/roles

Consumes

  • application/xml

  • application/json

Produces

  • application/xml

  • application/json

Parameters

Response

Roles

removeUserRoleAtScope

Remove a role with the specific scope from the matching user.

Endpoint

/app/rest/users/{userLocator}/roles/{roleId}/{scope}

Parameters

getUserRolesAtScope

Get a user role with the specific scope from the matching user.

Endpoint

/app/rest/users/{userLocator}/roles/{roleId}/{scope}

Produces

  • application/xml

  • application/json

Parameters

Response

Role

addRoleToUserAtScope

Add a role with the specific scope to the matching user.

Endpoint

/app/rest/users/{userLocator}/roles/{roleId}/{scope}

Produces

  • application/xml

  • application/json

Parameters

Response

Role

getUserTokens

Get all authentication tokens of the matching user.

Endpoint

/app/rest/users/{userLocator}/tokens

Produces

  • application/xml

  • application/json

Parameters

Response

Tokens

addUserToken

Create a new authentication token for the matching user.

Endpoint

/app/rest/users/{userLocator}/tokens

Produces

  • application/xml

  • application/json

Parameters

  • userLocator: string

  • body: Token

  • fields: string

Response

Token

deleteUserToken

Remove an authentication token from the matching user.

Endpoint

/app/rest/users/{userLocator}/tokens/{name}

Parameters

deleteUserField

Remove a property of the matching user.

Endpoint

/app/rest/users/{userLocator}/{field}

Parameters

getUserField

Get a field of the matching user.

Endpoint

/app/rest/users/{userLocator}/{field}

Produces

  • text/plain

Parameters

Response

string

setUserField

Update a field of the matching user.

Endpoint

/app/rest/users/{userLocator}/{field}

Consumes

  • text/plain

Produces

  • text/plain

Parameters

Response

string

Last modified: 30 March 2022