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 /examples/api/AgentApi and model examples
  • This is autogenerated page, don’t change them directly, use template. Read more in Development
Method HTTP request
delete_agent DELETE /app/rest/agents/{agentLocator}
ge_incompatible_build_types GET /app/rest/agents/{agentLocator}/incompatibleBuildTypes
get_agent_pool GET /app/rest/agents/{agentLocator}/pool
get_authorized_info GET /app/rest/agents/{agentLocator}/authorizedInfo
get_compatible_build_types GET /app/rest/agents/{agentLocator}/compatibleBuildTypes
get_enabled_info GET /app/rest/agents/{agentLocator}/enabledInfo
serve_agent GET /app/rest/agents/{agentLocator}
serve_agent_field GET /app/rest/agents/{agentLocator}/{field}
serve_agents GET /app/rest/agents
set_agent_field PUT /app/rest/agents/{agentLocator}/{field}
set_agent_pool PUT /app/rest/agents/{agentLocator}/pool
set_authorized_info PUT /app/rest/agents/{agentLocator}/authorizedInfo
set_enabled_info PUT /app/rest/agents/{agentLocator}/enabledInfo

delete_agent

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

Back to top

ge_incompatible_build_types

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

Back to top

get_agent_pool

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

Back to top

get_authorized_info

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

Back to top

get_compatible_build_types

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

Back to top

get_enabled_info

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

Back to top

serve_agent

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

Back to top

serve_agent_field

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

Back to top

serve_agents

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

Back to top

set_agent_field

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

Back to top

set_agent_pool

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

Back to top

set_authorized_info

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

Back to top

set_enabled_info

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

Back to top