dohq_teamcity.AgentPoolApi¶
Note
- All
serve_*method have aliases with get:serve_something==get_something - Some API have
getmethod - default method to get object by locator (e.gagent_api.get('id:123')returnAgentmodel by id - See more examples on page /examples/api/AgentPoolApi and model examples
- This is autogenerated page, don’t change them directly, use template. Read more in Development
| Method | HTTP request |
|---|---|
| add_agent | POST /app/rest/agentPools/{agentPoolLocator}/agents |
| add_project | POST /app/rest/agentPools/{agentPoolLocator}/projects |
| create_pool | POST /app/rest/agentPools |
| delete_pool | DELETE /app/rest/agentPools/{agentPoolLocator} |
| delete_pool_project | DELETE /app/rest/agentPools/{agentPoolLocator}/projects/{projectLocator} |
| delete_projects | DELETE /app/rest/agentPools/{agentPoolLocator}/projects |
| get_field | GET /app/rest/agentPools/{agentPoolLocator}/{field} |
| get_pool | GET /app/rest/agentPools/{agentPoolLocator} |
| get_pool_agents | GET /app/rest/agentPools/{agentPoolLocator}/agents |
| get_pool_project | GET /app/rest/agentPools/{agentPoolLocator}/projects/{projectLocator} |
| get_pool_projects | GET /app/rest/agentPools/{agentPoolLocator}/projects |
| get_pools | GET /app/rest/agentPools |
| replace_projects | PUT /app/rest/agentPools/{agentPoolLocator}/projects |
| set_field | PUT /app/rest/agentPools/{agentPoolLocator}/{field} |
add_agent¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
body = dohq_teamcity.Agent() # Agent | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.agent_pool_api.add_agent(agent_pool_locator, body=body, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->add_agent: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| body | Agent | [optional] |
| fields | str | [optional] |
- Return type:
- Agent
add_project¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
body = dohq_teamcity.Project() # Project | (optional)
try:
api_response = tc.agent_pool_api.add_project(agent_pool_locator, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->add_project: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| body | Project | [optional] |
- Return type:
- Project
create_pool¶
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.AgentPool() # AgentPool | (optional)
try:
api_response = tc.agent_pool_api.create_pool(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->create_pool: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| body | AgentPool | [optional] |
- Return type:
- AgentPool
delete_pool¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
try:
tc.agent_pool_api.delete_pool(agent_pool_locator)
except ApiException as e:
print("Exception when calling AgentPoolApi->delete_pool: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str |
- Return type:
- void (empty response body)
delete_pool_project¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
project_locator = 'project_locator_example' # str |
try:
tc.agent_pool_api.delete_pool_project(agent_pool_locator, project_locator)
except ApiException as e:
print("Exception when calling AgentPoolApi->delete_pool_project: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| project_locator | str |
- Return type:
- void (empty response body)
delete_projects¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
try:
tc.agent_pool_api.delete_projects(agent_pool_locator)
except ApiException as e:
print("Exception when calling AgentPoolApi->delete_projects: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str |
- Return type:
- void (empty response body)
get_field¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
field = 'field_example' # str |
try:
api_response = tc.agent_pool_api.get_field(agent_pool_locator, field)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->get_field: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| field | str |
- Return type:
- str
get_pool¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.agent_pool_api.get_pool(agent_pool_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->get_pool: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| fields | str | [optional] |
- Return type:
- AgentPool
get_pool_agents¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
locator = 'locator_example' # str | (optional)
fields = 'fields_example' # str | (optional)
try:
api_response = tc.agent_pool_api.get_pool_agents(agent_pool_locator, locator=locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->get_pool_agents: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| locator | str | [optional] |
| fields | str | [optional] |
- Return type:
- Agents
get_pool_project¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
project_locator = 'project_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.agent_pool_api.get_pool_project(agent_pool_locator, project_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->get_pool_project: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| project_locator | str | |
| fields | str | [optional] |
- Return type:
- Project
get_pool_projects¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
fields = 'fields_example' # str | (optional)
try:
api_response = tc.agent_pool_api.get_pool_projects(agent_pool_locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->get_pool_projects: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| fields | str | [optional] |
- Return type:
- Projects
get_pools¶
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.agent_pool_api.get_pools(locator=locator, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->get_pools: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| locator | str | [optional] |
| fields | str | [optional] |
- Return type:
- AgentPools
replace_projects¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
body = dohq_teamcity.Projects() # Projects | (optional)
try:
api_response = tc.agent_pool_api.replace_projects(agent_pool_locator, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->replace_projects: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| body | Projects | [optional] |
- Return type:
- Projects
set_field¶
from pprint import pprint
from dohq_teamcity import TeamCity, ApiException
# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))
agent_pool_locator = 'agent_pool_locator_example' # str |
field = 'field_example' # str |
body = 'body_example' # str | (optional)
try:
api_response = tc.agent_pool_api.set_field(agent_pool_locator, field, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentPoolApi->set_field: %s\n" % e)
| Name | Types | Notes |
|---|---|---|
| agent_pool_locator | str | |
| field | str | |
| body | str | [optional] |
- Return type:
- str