dohq_teamcity.BuildQueueApi ###################################### .. 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/BuildQueueApi` 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_tags` - **POST** ``/app/rest/buildQueue/{buildLocator}/tags`` * - :ref:`cancel_build` - **GET** ``/app/rest/buildQueue/{buildLocator}/example/buildCancelRequest`` * - :ref:`cancel_build_0` - **POST** ``/app/rest/buildQueue/{queuedBuildLocator}`` * - :ref:`delete_build` - **DELETE** ``/app/rest/buildQueue/{queuedBuildLocator}`` * - :ref:`delete_builds_experimental` - **DELETE** ``/app/rest/buildQueue`` * - :ref:`get_build` - **GET** ``/app/rest/buildQueue/{queuedBuildLocator}`` * - :ref:`get_builds` - **GET** ``/app/rest/buildQueue`` * - :ref:`queue_new_build` - **POST** ``/app/rest/buildQueue`` * - :ref:`replace_builds` - **PUT** ``/app/rest/buildQueue`` * - :ref:`replace_tags` - **PUT** ``/app/rest/buildQueue/{buildLocator}/tags`` * - :ref:`serve_build_field_by_build_only` - **GET** ``/app/rest/buildQueue/{buildLocator}/{field}`` * - :ref:`serve_compatible_agents` - **GET** ``/app/rest/buildQueue/{queuedBuildLocator}/compatibleAgents`` * - :ref:`serve_tags` - **GET** ``/app/rest/buildQueue/{buildLocator}/tags`` * - :ref:`set_build_queue_order` - **PUT** ``/app/rest/buildQueue/order`` * - :ref:`set_build_queue_position` - **GET** ``/app/rest/buildQueue/order/{queuePosition}`` * - :ref:`set_build_queue_position_0` - **PUT** ``/app/rest/buildQueue/order/{queuePosition}`` .. _add_tags: add_tags ----------------- .. 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')) build_locator = 'build_locator_example' # str | body = dohq_teamcity.Tags() # Tags | (optional) try: tc.build_queue_api.add_tags(build_locator, body=body) except ApiException as e: print("Exception when calling BuildQueueApi->add_tags: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **build_locator** - **str** - * - **body** - `Tags <../models/Tags.html>`_ - [optional] Return type: void (empty response body) `Back to top <#>`_ .. _cancel_build: cancel_build ----------------- .. 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')) build_locator = 'build_locator_example' # str | try: api_response = tc.build_queue_api.cancel_build(build_locator) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->cancel_build: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **build_locator** - **str** - Return type: `BuildCancelRequest <../models/BuildCancelRequest.html>`_ `Back to top <#>`_ .. _cancel_build_0: cancel_build_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')) queued_build_locator = 'queued_build_locator_example' # str | body = dohq_teamcity.BuildCancelRequest() # BuildCancelRequest | (optional) try: api_response = tc.build_queue_api.cancel_build_0(queued_build_locator, body=body) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->cancel_build_0: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **queued_build_locator** - **str** - * - **body** - `BuildCancelRequest <../models/BuildCancelRequest.html>`_ - [optional] Return type: `Build <../models/Build.html>`_ `Back to top <#>`_ .. _delete_build: delete_build ----------------- .. 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')) queued_build_locator = 'queued_build_locator_example' # str | try: tc.build_queue_api.delete_build(queued_build_locator) except ApiException as e: print("Exception when calling BuildQueueApi->delete_build: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **queued_build_locator** - **str** - Return type: void (empty response body) `Back to top <#>`_ .. _delete_builds_experimental: delete_builds_experimental ----------------- .. 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: tc.build_queue_api.delete_builds_experimental(locator=locator, fields=fields) except ApiException as e: print("Exception when calling BuildQueueApi->delete_builds_experimental: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **locator** - **str** - [optional] * - **fields** - **str** - [optional] Return type: void (empty response body) `Back to top <#>`_ .. _get_build: get_build ----------------- .. 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')) queued_build_locator = 'queued_build_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.get_build(queued_build_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->get_build: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **queued_build_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Build <../models/Build.html>`_ `Back to top <#>`_ .. _get_builds: get_builds ----------------- .. 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.build_queue_api.get_builds(locator=locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->get_builds: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **locator** - **str** - [optional] * - **fields** - **str** - [optional] Return type: `Builds <../models/Builds.html>`_ `Back to top <#>`_ .. _queue_new_build: queue_new_build ----------------- .. 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.Build() # Build | (optional) move_to_top = true # bool | (optional) try: api_response = tc.build_queue_api.queue_new_build(body=body, move_to_top=move_to_top) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->queue_new_build: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **body** - `Build <../models/Build.html>`_ - [optional] * - **move_to_top** - **bool** - [optional] Return type: `Build <../models/Build.html>`_ `Back to top <#>`_ .. _replace_builds: replace_builds ----------------- .. 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.Builds() # Builds | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.replace_builds(body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->replace_builds: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **body** - `Builds <../models/Builds.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `Builds <../models/Builds.html>`_ `Back to top <#>`_ .. _replace_tags: replace_tags ----------------- .. 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')) build_locator = 'build_locator_example' # str | locator = 'locator_example' # str | (optional) body = dohq_teamcity.Tags() # Tags | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.replace_tags(build_locator, locator=locator, body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->replace_tags: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **build_locator** - **str** - * - **locator** - **str** - [optional] * - **body** - `Tags <../models/Tags.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `Tags <../models/Tags.html>`_ `Back to top <#>`_ .. _serve_build_field_by_build_only: serve_build_field_by_build_only ----------------- .. 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')) build_locator = 'build_locator_example' # str | field = 'field_example' # str | try: api_response = tc.build_queue_api.serve_build_field_by_build_only(build_locator, field) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->serve_build_field_by_build_only: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **build_locator** - **str** - * - **field** - **str** - Return type: **str** `Back to top <#>`_ .. _serve_compatible_agents: serve_compatible_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')) queued_build_locator = 'queued_build_locator_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.serve_compatible_agents(queued_build_locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->serve_compatible_agents: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **queued_build_locator** - **str** - * - **fields** - **str** - [optional] Return type: `Agents <../models/Agents.html>`_ `Back to top <#>`_ .. _serve_tags: serve_tags ----------------- .. 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')) build_locator = 'build_locator_example' # str | locator = 'locator_example' # str | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.serve_tags(build_locator, locator=locator, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->serve_tags: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **build_locator** - **str** - * - **locator** - **str** - [optional] * - **fields** - **str** - [optional] Return type: `Tags <../models/Tags.html>`_ `Back to top <#>`_ .. _set_build_queue_order: set_build_queue_order ----------------- .. 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.Builds() # Builds | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.set_build_queue_order(body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->set_build_queue_order: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **body** - `Builds <../models/Builds.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `Builds <../models/Builds.html>`_ `Back to top <#>`_ .. _set_build_queue_position: set_build_queue_position ----------------- .. 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')) queue_position = 'queue_position_example' # str | fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.set_build_queue_position(queue_position, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->set_build_queue_position: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **queue_position** - **str** - * - **fields** - **str** - [optional] Return type: `Build <../models/Build.html>`_ `Back to top <#>`_ .. _set_build_queue_position_0: set_build_queue_position_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')) queue_position = 'queue_position_example' # str | body = dohq_teamcity.Build() # Build | (optional) fields = 'fields_example' # str | (optional) try: api_response = tc.build_queue_api.set_build_queue_position_0(queue_position, body=body, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling BuildQueueApi->set_build_queue_position_0: %s\n" % e) .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Name - Types - Notes * - **queue_position** - **str** - * - **body** - `Build <../models/Build.html>`_ - [optional] * - **fields** - **str** - [optional] Return type: `Build <../models/Build.html>`_ `Back to top <#>`_