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 /examples/api/BuildQueueApi and model examples
  • This is autogenerated page, don’t change them directly, use template. Read more in Development
Method HTTP request
add_tags POST /app/rest/buildQueue/{buildLocator}/tags
cancel_build GET /app/rest/buildQueue/{buildLocator}/example/buildCancelRequest
cancel_build_0 POST /app/rest/buildQueue/{queuedBuildLocator}
delete_build DELETE /app/rest/buildQueue/{queuedBuildLocator}
delete_builds_experimental DELETE /app/rest/buildQueue
get_build GET /app/rest/buildQueue/{queuedBuildLocator}
get_builds GET /app/rest/buildQueue
queue_new_build POST /app/rest/buildQueue
replace_builds PUT /app/rest/buildQueue
replace_tags PUT /app/rest/buildQueue/{buildLocator}/tags
serve_build_field_by_build_only GET /app/rest/buildQueue/{buildLocator}/{field}
serve_compatible_agents GET /app/rest/buildQueue/{queuedBuildLocator}/compatibleAgents
serve_tags GET /app/rest/buildQueue/{buildLocator}/tags
set_build_queue_order PUT /app/rest/buildQueue/order
set_build_queue_position GET /app/rest/buildQueue/order/{queuePosition}
set_build_queue_position_0 PUT /app/rest/buildQueue/order/{queuePosition}

add_tags

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)
Name Types Notes
build_locator str  
body Tags [optional]
Return type:
void (empty response body)

Back to top

cancel_build

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)
Name Types Notes
build_locator str  
Return type:
BuildCancelRequest

Back to top

cancel_build_0

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)
Name Types Notes
queued_build_locator str  
body BuildCancelRequest [optional]
Return type:
Build

Back to top

delete_build

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)
Name Types Notes
queued_build_locator str  
Return type:
void (empty response body)

Back to top

delete_builds_experimental

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)
Name Types Notes
locator str [optional]
fields str [optional]
Return type:
void (empty response body)

Back to top

get_build

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)
Name Types Notes
queued_build_locator str  
fields str [optional]
Return type:
Build

Back to top

get_builds

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)
Name Types Notes
locator str [optional]
fields str [optional]
Return type:
Builds

Back to top

queue_new_build

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)
Name Types Notes
body Build [optional]
move_to_top bool [optional]
Return type:
Build

Back to top

replace_builds

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)
Name Types Notes
body Builds [optional]
fields str [optional]
Return type:
Builds

Back to top

replace_tags

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)
Name Types Notes
build_locator str  
locator str [optional]
body Tags [optional]
fields str [optional]
Return type:
Tags

Back to top

serve_build_field_by_build_only

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)
Name Types Notes
build_locator str  
field str  
Return type:
str

Back to top

serve_compatible_agents

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)
Name Types Notes
queued_build_locator str  
fields str [optional]
Return type:
Agents

Back to top

serve_tags

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)
Name Types Notes
build_locator str  
locator str [optional]
fields str [optional]
Return type:
Tags

Back to top

set_build_queue_order

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)
Name Types Notes
body Builds [optional]
fields str [optional]
Return type:
Builds

Back to top

set_build_queue_position

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)
Name Types Notes
queue_position str  
fields str [optional]
Return type:
Build

Back to top

set_build_queue_position_0

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)
Name Types Notes
queue_position str  
body Build [optional]
fields str [optional]
Return type:
Build

Back to top