TeamCity 2020.2 Help

UserApi

getAllUsers

Get all users.

Endpoint

/app/rest/users

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

  • locator: string
  • fields: string

Response

Users

addUser

Create a new user.

Endpoint

/app/rest/users

HTTP method

POST

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}

HTTP method

DELETE

Parameters

getUser

Get user matching the locator.

Endpoint

/app/rest/users/{userLocator}

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

Response

User

replaceUser

Update user matching the locator.

Endpoint

/app/rest/users/{userLocator}

HTTP method

PUT

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

HTTP method

DELETE

Produces

  • text/plain

Parameters

getAllUserGroups

Get all groups of the matching user.

Endpoint

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

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

Response

Groups

setUserGroups

Update groups of the matching user.

Endpoint

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

HTTP method

PUT

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}

HTTP method

DELETE

Parameters

  • userLocator: string <UserLocator>
  • groupLocator: string
  • fields: string

getUserGroup

Get a user group of the matching user.

Endpoint

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

HTTP method

GET

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

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

Response

PermissionAssignments

getUserProperties

Get all properties of the matching user.

Endpoint

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

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

Response

Properties

removeUserProperty

Remove a property of the matching user.

Endpoint

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

HTTP method

DELETE

Parameters

getUserProperty

Get a property of the matching user.

Endpoint

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

HTTP method

GET

Produces

  • text/plain

Parameters

Response

string

setUserProperty

Update a property of the matching user.

Endpoint

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

HTTP method

PUT

Consumes

  • text/plain

Produces

  • text/plain

Parameters

Response

string

getAllUserRoles

Get all user roles of the matching user.

Endpoint

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

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

Response

Roles

addRoleToUser

Add a role to the matching user.

Endpoint

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

HTTP method

POST

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

HTTP method

PUT

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}

HTTP method

DELETE

Parameters

getUserRolesAtScope

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

Endpoint

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

HTTP method

GET

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}

HTTP method

PUT

Produces

  • application/xml
  • application/json

Parameters

Response

Role

getUserTokens

Get all authentication tokens of the matching user.

Endpoint

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

HTTP method

GET

Produces

  • application/xml
  • application/json

Parameters

Response

Tokens

addUserToken

Create a new authentication token for the matching user.

Endpoint

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

HTTP method

POST

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}

HTTP method

DELETE

Parameters

deleteUserField

Remove a property of the matching user.

Endpoint

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

HTTP method

DELETE

Parameters

getUserField

Get a field of the matching user.

Endpoint

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

HTTP method

GET

Produces

  • text/plain

Parameters

Response

string

setUserField

Update a field of the matching user.

Endpoint

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

HTTP method

PUT

Consumes

  • text/plain

Produces

  • text/plain

Parameters

Response

string

Last modified: 20 February 2021