dohq_teamcity.AgentApi ###################################### .. 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/AgentApi` 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:`delete_agent` - **DELETE** ``/app/rest/agents/{agentLocator}`` * - :ref:`ge_incompatible_build_types` - **GET** ``/app/rest/agents/{agentLocator}/incompatibleBuildTypes`` * - :ref:`get_agent_pool` - **GET** ``/app/rest/agents/{agentLocator}/pool`` * - :ref:`get_authorized_info` - **GET** ``/app/rest/agents/{agentLocator}/authorizedInfo`` * - :ref:`get_compatible_build_types` - **GET** ``/app/rest/agents/{agentLocator}/compatibleBuildTypes`` * - :ref:`get_enabled_info` - **GET** ``/app/rest/agents/{agentLocator}/enabledInfo`` * - :ref:`serve_agent` - **GET** ``/app/rest/agents/{agentLocator}`` * - :ref:`serve_agent_field` - **GET** ``/app/rest/agents/{agentLocator}/{field}`` * - :ref:`serve_agents` - **GET** ``/app/rest/agents`` * - :ref:`set_agent_field` - **PUT** ``/app/rest/agents/{agentLocator}/{field}`` * - :ref:`set_agent_pool` - **PUT** ``/app/rest/agents/{agentLocator}/pool`` * - :ref:`set_authorized_info` - **PUT** ``/app/rest/agents/{agentLocator}/authorizedInfo`` * - :ref:`set_enabled_info` - **PUT** ``/app/rest/agents/{agentLocator}/enabledInfo`` .. _delete_agent: delete_agent ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | try: tc.agent_api.delete_agent(agent_locator) except ApiException as e: print("Exception when calling AgentApi->delete_agent: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _ge_incompatible_build_types: ge_incompatible_build_types ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.ge_incompatible_build_types(agent_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->ge_incompatible_build_types: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Compatibilities <../models/Compatibilities.html>`_ `Back to top <#>`_ .. _get_agent_pool: get_agent_pool ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.get_agent_pool(agent_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->get_agent_pool: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **fields** - **str** - [optional] Return type: `AgentPool <../models/AgentPool.html>`_ `Back to top <#>`_ .. _get_authorized_info: get_authorized_info ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.get_authorized_info(agent_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->get_authorized_info: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **fields** - **str** - [optional] Return type: `AuthorizedInfo <../models/AuthorizedInfo.html>`_ `Back to top <#>`_ .. _get_compatible_build_types: get_compatible_build_types ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.get_compatible_build_types(agent_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->get_compatible_build_types: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **fields** - **str** - [optional] Return type: `BuildTypes <../models/BuildTypes.html>`_ `Back to top <#>`_ .. _get_enabled_info: get_enabled_info ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.get_enabled_info(agent_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->get_enabled_info: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **fields** - **str** - [optional] Return type: `EnabledInfo <../models/EnabledInfo.html>`_ `Back to top <#>`_ .. _serve_agent: serve_agent ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.serve_agent(agent_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->serve_agent: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Agent <../models/Agent.html>`_ `Back to top <#>`_ .. _serve_agent_field: serve_agent_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')) agent_locator = 'agent_locator_example' # str | field = 'field_example' # str | try: api_response = tc.agent_api.serve_agent_field(agent_locator, field) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->serve_agent_field: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **field** - **str** - Return type: **str** `Back to top <#>`_ .. _serve_agents: serve_agents ----------------- .. 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')) include_disconnected = true # bool | (optional) include_unauthorized = true # bool | (optional) locator = 'locator_example' # str | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.serve_agents(include_disconnected=include_disconnected, include_unauthorized=include_unauthorized, locator=locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->serve_agents: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **include_disconnected** - **bool** - [optional] * - **include_unauthorized** - **bool** - [optional] * - **locator** - **str** - [optional] * - **fields** - **str** - [optional] Return type: `Agents <../models/Agents.html>`_ `Back to top <#>`_ .. _set_agent_field: set_agent_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')) agent_locator = 'agent_locator_example' # str | field = 'field_example' # str | body = 'body_example' # str | (optional) try: api_response = tc.agent_api.set_agent_field(agent_locator, field, body=body) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->set_agent_field: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **field** - **str** - * - **body** - **str** - [optional] Return type: **str** `Back to top <#>`_ .. _set_agent_pool: set_agent_pool ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | body = dohq_teamcity.AgentPool() # AgentPool | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.set_agent_pool(agent_locator, body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->set_agent_pool: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **body** - `AgentPool <../models/AgentPool.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `AgentPool <../models/AgentPool.html>`_ `Back to top <#>`_ .. _set_authorized_info: set_authorized_info ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | body = dohq_teamcity.AuthorizedInfo() # AuthorizedInfo | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.set_authorized_info(agent_locator, body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->set_authorized_info: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **body** - `AuthorizedInfo <../models/AuthorizedInfo.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `AuthorizedInfo <../models/AuthorizedInfo.html>`_ `Back to top <#>`_ .. _set_enabled_info: set_enabled_info ----------------- .. 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')) agent_locator = 'agent_locator_example' # str | body = dohq_teamcity.EnabledInfo() # EnabledInfo | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.agent_api.set_enabled_info(agent_locator, body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling AgentApi->set_enabled_info: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **agent_locator** - **str** - * - **body** - `EnabledInfo <../models/EnabledInfo.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `EnabledInfo <../models/EnabledInfo.html>`_ `Back to top <#>`_