dohq_teamcity.UserApi ###################################### .. note:: + All ``serve_*`` method have aliases with get: ``serve_something`` == ``get_something`` + Some API have ``get`` method - default method to get object by locator (e.g ``agent_api.get('id:123')`` return ``Agent`` model by id + See more examples on page :doc:`/examples/api/UserApi` and model examples + This is autogenerated page, don't change them directly, use template. Read more in :doc:`/development` .. list-table:: :widths: 20 80 :header-rows: 1 * - Method - HTTP request * - :ref:`add_group` - **POST** ``/app/rest/users/{userLocator}/groups`` * - :ref:`add_role` - **POST** ``/app/rest/users/{userLocator}/roles`` * - :ref:`add_role_simple` - **PUT** ``/app/rest/users/{userLocator}/roles/{roleId}/{scope}`` * - :ref:`add_role_simple_post` - **POST** ``/app/rest/users/{userLocator}/roles/{roleId}/{scope}`` * - :ref:`create_user` - **POST** ``/app/rest/users`` * - :ref:`delete_remember_me` - **DELETE** ``/app/rest/users/{userLocator}/debug/rememberMe`` * - :ref:`delete_role` - **DELETE** ``/app/rest/users/{userLocator}/roles/{roleId}/{scope}`` * - :ref:`delete_user` - **DELETE** ``/app/rest/users/{userLocator}`` * - :ref:`delete_user_field` - **DELETE** ``/app/rest/users/{userLocator}/{field}`` * - :ref:`get_group` - **GET** ``/app/rest/users/{userLocator}/groups/{groupLocator}`` * - :ref:`get_groups` - **GET** ``/app/rest/users/{userLocator}/groups`` * - :ref:`get_permissions` - **GET** ``/app/rest/users/{userLocator}/debug/permissions`` * - :ref:`get_permissions_0` - **GET** ``/app/rest/users/{userLocator}/permissions`` * - :ref:`list_role` - **GET** ``/app/rest/users/{userLocator}/roles/{roleId}/{scope}`` * - :ref:`list_roles` - **GET** ``/app/rest/users/{userLocator}/roles`` * - :ref:`put_user_property` - **PUT** ``/app/rest/users/{userLocator}/properties/{name}`` * - :ref:`remove_group` - **DELETE** ``/app/rest/users/{userLocator}/groups/{groupLocator}`` * - :ref:`remove_user_property` - **DELETE** ``/app/rest/users/{userLocator}/properties/{name}`` * - :ref:`replace_groups` - **PUT** ``/app/rest/users/{userLocator}/groups`` * - :ref:`replace_roles` - **PUT** ``/app/rest/users/{userLocator}/roles`` * - :ref:`serve_user` - **GET** ``/app/rest/users/{userLocator}`` * - :ref:`serve_user_field` - **GET** ``/app/rest/users/{userLocator}/{field}`` * - :ref:`serve_user_properties` - **GET** ``/app/rest/users/{userLocator}/properties`` * - :ref:`serve_user_property` - **GET** ``/app/rest/users/{userLocator}/properties/{name}`` * - :ref:`serve_users` - **GET** ``/app/rest/users`` * - :ref:`set_user_field` - **PUT** ``/app/rest/users/{userLocator}/{field}`` * - :ref:`update_user` - **PUT** ``/app/rest/users/{userLocator}`` .. _add_group: add_group ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **body** - `Group <../models/Group.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `Group <../models/Group.html>`_ `Back to top <#>`_ .. _add_role: add_role ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **body** - `Role <../models/Role.html>`_ - [optional] Return type: `Role <../models/Role.html>`_ `Back to top <#>`_ .. _add_role_simple: add_role_simple ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **role_id** - **str** - * - **scope** - **str** - Return type: `Role <../models/Role.html>`_ `Back to top <#>`_ .. _add_role_simple_post: add_role_simple_post ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **role_id** - **str** - * - **scope** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _create_user: create_user ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **body** - `User <../models/User.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `User <../models/User.html>`_ `Back to top <#>`_ .. _delete_remember_me: delete_remember_me ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _delete_role: delete_role ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **role_id** - **str** - * - **scope** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _delete_user: delete_user ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _delete_user_field: delete_user_field ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **field** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _get_group: get_group ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **group_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Group <../models/Group.html>`_ `Back to top <#>`_ .. _get_groups: get_groups ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Groups <../models/Groups.html>`_ `Back to top <#>`_ .. _get_permissions: get_permissions ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - Return type: **str** `Back to top <#>`_ .. _get_permissions_0: get_permissions_0 ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **locator** - **str** - [optional] * - **fields** - **str** - [optional] Return type: `PermissionAssignments <../models/PermissionAssignments.html>`_ `Back to top <#>`_ .. _list_role: list_role ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **role_id** - **str** - * - **scope** - **str** - Return type: `Role <../models/Role.html>`_ `Back to top <#>`_ .. _list_roles: list_roles ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - Return type: `Roles <../models/Roles.html>`_ `Back to top <#>`_ .. _put_user_property: put_user_property ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **name** - **str** - * - **body** - **str** - [optional] Return type: **str** `Back to top <#>`_ .. _remove_group: remove_group ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **group_locator** - **str** - * - **fields** - **str** - [optional] Return type: void (empty response body) `Back to top <#>`_ .. _remove_user_property: remove_user_property ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **name** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _replace_groups: replace_groups ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **body** - `Groups <../models/Groups.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `Groups <../models/Groups.html>`_ `Back to top <#>`_ .. _replace_roles: replace_roles ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **body** - `Roles <../models/Roles.html>`_ - [optional] Return type: `Roles <../models/Roles.html>`_ `Back to top <#>`_ .. _serve_user: serve_user ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **fields** - **str** - [optional] Return type: `User <../models/User.html>`_ `Back to top <#>`_ .. _serve_user_field: serve_user_field ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **field** - **str** - Return type: **str** `Back to top <#>`_ .. _serve_user_properties: serve_user_properties ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Properties <../models/Properties.html>`_ `Back to top <#>`_ .. _serve_user_property: serve_user_property ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **name** - **str** - Return type: **str** `Back to top <#>`_ .. _serve_users: serve_users ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **locator** - **str** - [optional] * - **fields** - **str** - [optional] Return type: `Users <../models/Users.html>`_ `Back to top <#>`_ .. _set_user_field: set_user_field ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **field** - **str** - * - **body** - **str** - [optional] Return type: **str** `Back to top <#>`_ .. _update_user: update_user ----------------- .. code-block:: python 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) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **user_locator** - **str** - * - **body** - `User <../models/User.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `User <../models/User.html>`_ `Back to top <#>`_