dohq_teamcity.UserApi¶
Note
- All
serve_*method have aliases with get:serve_something==get_something - Some API have
getmethod - default method to get object by locator (e.gagent_api.get('id:123')returnAgentmodel by id - See more examples on page /examples/api/UserApi and model examples
- This is autogenerated page, don’t change them directly, use template. Read more in Development
| Method | HTTP request |
|---|---|
| add_group | POST /app/rest/users/{userLocator}/groups |
| add_role | POST /app/rest/users/{userLocator}/roles |
| add_role_simple | PUT /app/rest/users/{userLocator}/roles/{roleId}/{scope} |
| add_role_simple_post | POST /app/rest/users/{userLocator}/roles/{roleId}/{scope} |
| create_user | POST /app/rest/users |
| delete_remember_me | DELETE /app/rest/users/{userLocator}/debug/rememberMe |
| delete_role | DELETE /app/rest/users/{userLocator}/roles/{roleId}/{scope} |
| delete_user | DELETE /app/rest/users/{userLocator} |
| delete_user_field | DELETE /app/rest/users/{userLocator}/{field} |
| get_group | GET /app/rest/users/{userLocator}/groups/{groupLocator} |
| get_groups | GET /app/rest/users/{userLocator}/groups |
| get_permissions | GET /app/rest/users/{userLocator}/debug/permissions |
| get_permissions_0 | GET /app/rest/users/{userLocator}/permissions |
| list_role | GET /app/rest/users/{userLocator}/roles/{roleId}/{scope} |
| list_roles | GET /app/rest/users/{userLocator}/roles |
| put_user_property | PUT /app/rest/users/{userLocator}/properties/{name} |
| remove_group | DELETE /app/rest/users/{userLocator}/groups/{groupLocator} |
| remove_user_property | DELETE /app/rest/users/{userLocator}/properties/{name} |
| replace_groups | PUT /app/rest/users/{userLocator}/groups |
| replace_roles | PUT /app/rest/users/{userLocator}/roles |
| serve_user | GET /app/rest/users/{userLocator} |
| serve_user_field | GET /app/rest/users/{userLocator}/{field} |
| serve_user_properties | GET /app/rest/users/{userLocator}/properties |
| serve_user_property | GET /app/rest/users/{userLocator}/properties/{name} |
| serve_users | GET /app/rest/users |
| set_user_field | PUT /app/rest/users/{userLocator}/{field} |
| update_user | PUT /app/rest/users/{userLocator} |
add_group¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
body = dohq_teamcity.Group() # Group | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.add_group(user_locator, body=body, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->add_group: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| body | Group | [optional] |
| fields | str | [optional] |
- Return type:
- Group
add_role¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
body = dohq_teamcity.Role() # Role | (optional)
try:
api_response = tc.user_api.add_role(user_locator, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->add_role: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| body | Role | [optional] |
- Return type:
- Role
add_role_simple¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |
try:
api_response = tc.user_api.add_role_simple(user_locator, role_id, scope)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->add_role_simple: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| role_id | str | |
| scope | str |
- Return type:
- Role
add_role_simple_post¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |
try:
tc.user_api.add_role_simple_post(user_locator, role_id, scope)
except ApiException as e:
print("Exception when calling UserApi->add_role_simple_post: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| role_id | str | |
| scope | str |
- Return type:
- void (empty response body)
create_user¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
body = dohq_teamcity.User() # User | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.create_user(body=body, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->create_user: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| body | User | [optional] |
| fields | str | [optional] |
- Return type:
- User
delete_remember_me¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
try:
tc.user_api.delete_remember_me(user_locator)
except ApiException as e:
print("Exception when calling UserApi->delete_remember_me: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str |
- Return type:
- void (empty response body)
delete_role¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |
try:
tc.user_api.delete_role(user_locator, role_id, scope)
except ApiException as e:
print("Exception when calling UserApi->delete_role: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| role_id | str | |
| scope | str |
- Return type:
- void (empty response body)
delete_user¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
try:
tc.user_api.delete_user(user_locator)
except ApiException as e:
print("Exception when calling UserApi->delete_user: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str |
- Return type:
- void (empty response body)
delete_user_field¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
field = 'field_example' # str |
try:
tc.user_api.delete_user_field(user_locator, field)
except ApiException as e:
print("Exception when calling UserApi->delete_user_field: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| field | str |
- Return type:
- void (empty response body)
get_group¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
group_locator = 'group_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.get_group(user_locator, group_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->get_group: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| group_locator | str | |
| fields | str | [optional] |
- Return type:
- Group
get_groups¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.get_groups(user_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->get_groups: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| fields | str | [optional] |
- Return type:
- Groups
get_permissions¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
try:
api_response = tc.user_api.get_permissions(user_locator)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->get_permissions: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str |
- Return type:
- str
get_permissions_0¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
locator = 'locator_example' # str | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.get_permissions_0(user_locator, locator=locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->get_permissions_0: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| locator | str | [optional] |
| fields | str | [optional] |
- Return type:
- PermissionAssignments
list_role¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |
try:
api_response = tc.user_api.list_role(user_locator, role_id, scope)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->list_role: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| role_id | str | |
| scope | str |
- Return type:
- Role
list_roles¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
try:
api_response = tc.user_api.list_roles(user_locator)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->list_roles: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str |
- Return type:
- Roles
put_user_property¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
name = 'name_example' # str |
body = 'body_example' # str | (optional)
try:
api_response = tc.user_api.put_user_property(user_locator, name, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->put_user_property: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| name | str | |
| body | str | [optional] |
- Return type:
- str
remove_group¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
group_locator = 'group_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
tc.user_api.remove_group(user_locator, group_locator, fields=fields)
except ApiException as e:
print("Exception when calling UserApi->remove_group: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| group_locator | str | |
| fields | str | [optional] |
- Return type:
- void (empty response body)
remove_user_property¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
name = 'name_example' # str |
try:
tc.user_api.remove_user_property(user_locator, name)
except ApiException as e:
print("Exception when calling UserApi->remove_user_property: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| name | str |
- Return type:
- void (empty response body)
replace_groups¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
body = dohq_teamcity.Groups() # Groups | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.replace_groups(user_locator, body=body, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->replace_groups: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| body | Groups | [optional] |
| fields | str | [optional] |
- Return type:
- Groups
replace_roles¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
body = dohq_teamcity.Roles() # Roles | (optional)
try:
api_response = tc.user_api.replace_roles(user_locator, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->replace_roles: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| body | Roles | [optional] |
- Return type:
- Roles
serve_user¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.serve_user(user_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->serve_user: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| fields | str | [optional] |
- Return type:
- User
serve_user_field¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
field = 'field_example' # str |
try:
api_response = tc.user_api.serve_user_field(user_locator, field)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->serve_user_field: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| field | str |
- Return type:
- str
serve_user_properties¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.serve_user_properties(user_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->serve_user_properties: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| fields | str | [optional] |
- Return type:
- Properties
serve_user_property¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
name = 'name_example' # str |
try:
api_response = tc.user_api.serve_user_property(user_locator, name)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->serve_user_property: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| name | str |
- Return type:
- str
serve_users¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
locator = 'locator_example' # str | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.serve_users(locator=locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->serve_users: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| locator | str | [optional] |
| fields | str | [optional] |
- Return type:
- Users
set_user_field¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
field = 'field_example' # str |
body = 'body_example' # str | (optional)
try:
api_response = tc.user_api.set_user_field(user_locator, field, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->set_user_field: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| field | str | |
| body | str | [optional] |
- Return type:
- str
update_user¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
user_locator = 'user_locator_example' # str |
body = dohq_teamcity.User() # User | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.user_api.update_user(user_locator, body=body, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| user_locator | str | |
| body | User | [optional] |
| fields | str | [optional] |
- Return type:
- User