dohq_teamcity.ServerApi

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/ServerApi and model examples
  • This is autogenerated page, don’t change them directly, use template. Read more in Development
Method HTTP request
add_license_keys POST /app/rest/server/licensingData/licenseKeys
delete_license_key DELETE /app/rest/server/licensingData/licenseKeys/{licenseKey}
get_backup_status GET /app/rest/server/backup
get_children GET /app/rest/server/files/{areaId}/children{path}
get_children_alias GET /app/rest/server/files/{areaId}/{path}
get_content GET /app/rest/server/files/{areaId}/content{path}
get_content_alias GET /app/rest/server/files/{areaId}/files{path}
get_license_key GET /app/rest/server/licensingData/licenseKeys/{licenseKey}
get_license_keys GET /app/rest/server/licensingData/licenseKeys
get_licensing_data GET /app/rest/server/licensingData
get_metadata GET /app/rest/server/files/{areaId}/metadata{path}
get_root GET /app/rest/server/files/{areaId}
get_zipped GET /app/rest/server/files/{areaId}/archived{path}
serve_plugins GET /app/rest/server/plugins
serve_server_info GET /app/rest/server
serve_server_version GET /app/rest/server/{field}
start_backup POST /app/rest/server/backup

add_license_keys

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

body = 'body_example' # str |  (optional)
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.add_license_keys(body=body, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->add_license_keys: %s\n" % e)
Name Types Notes
body str [optional]
fields str [optional]
Return type:
LicenseKeys

Back to top

delete_license_key

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

license_key = 'license_key_example' # str |

try:
    tc.server_api.delete_license_key(license_key)
except ApiException as e:
    print("Exception when calling ServerApi->delete_license_key: %s\n" % e)
Name Types Notes
license_key str  
Return type:
void (empty response body)

Back to top

get_backup_status

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.BackupProcessManager() # BackupProcessManager |  (optional)

try:
    api_response = tc.server_api.get_backup_status(body=body)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_backup_status: %s\n" % e)
Name Types Notes
body BackupProcessManager [optional]
Return type:
str

Back to top

get_children

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

path = 'path_example' # str |
area_id = 'area_id_example' # str |
base_path = 'base_path_example' # str |  (optional)
locator = 'locator_example' # str |  (optional)
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_children(path, area_id, base_path=base_path, locator=locator, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_children: %s\n" % e)
Name Types Notes
path str  
area_id str  
base_path str [optional]
locator str [optional]
fields str [optional]
Return type:
Files

Back to top

get_children_alias

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

path = 'path_example' # str |
area_id = 'area_id_example' # str |
base_path = 'base_path_example' # str |  (optional)
locator = 'locator_example' # str |  (optional)
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_children_alias(path, area_id, base_path=base_path, locator=locator, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_children_alias: %s\n" % e)
Name Types Notes
path str  
area_id str  
base_path str [optional]
locator str [optional]
fields str [optional]
Return type:
Files

Back to top

get_content

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

path = 'path_example' # str |
area_id = 'area_id_example' # str |
response_builder = 'response_builder_example' # str |  (optional)

try:
    tc.server_api.get_content(path, area_id, response_builder=response_builder)
except ApiException as e:
    print("Exception when calling ServerApi->get_content: %s\n" % e)
Name Types Notes
path str  
area_id str  
response_builder str [optional]
Return type:
void (empty response body)

Back to top

get_content_alias

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

path = 'path_example' # str |
area_id = 'area_id_example' # str |

try:
    tc.server_api.get_content_alias(path, area_id)
except ApiException as e:
    print("Exception when calling ServerApi->get_content_alias: %s\n" % e)
Name Types Notes
path str  
area_id str  
Return type:
void (empty response body)

Back to top

get_license_key

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

license_key = 'license_key_example' # str |
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_license_key(license_key, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_license_key: %s\n" % e)
Name Types Notes
license_key str  
fields str [optional]
Return type:
LicenseKey

Back to top

get_license_keys

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_license_keys(fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_license_keys: %s\n" % e)
Name Types Notes
fields str [optional]
Return type:
LicenseKeys

Back to top

get_licensing_data

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_licensing_data(fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_licensing_data: %s\n" % e)
Name Types Notes
fields str [optional]
Return type:
LicensingData

Back to top

get_metadata

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

path = 'path_example' # str |
area_id = 'area_id_example' # str |
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_metadata(path, area_id, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_metadata: %s\n" % e)
Name Types Notes
path str  
area_id str  
fields str [optional]
Return type:
file

Back to top

get_root

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

area_id = 'area_id_example' # str |
base_path = 'base_path_example' # str |  (optional)
locator = 'locator_example' # str |  (optional)
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.get_root(area_id, base_path=base_path, locator=locator, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->get_root: %s\n" % e)
Name Types Notes
area_id str  
base_path str [optional]
locator str [optional]
fields str [optional]
Return type:
Files

Back to top

get_zipped

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

path = 'path_example' # str |
area_id = 'area_id_example' # str |
base_path = 'base_path_example' # str |  (optional)
locator = 'locator_example' # str |  (optional)
name = 'name_example' # str |  (optional)

try:
    tc.server_api.get_zipped(path, area_id, base_path=base_path, locator=locator, name=name)
except ApiException as e:
    print("Exception when calling ServerApi->get_zipped: %s\n" % e)
Name Types Notes
path str  
area_id str  
base_path str [optional]
locator str [optional]
name str [optional]
Return type:
void (empty response body)

Back to top

serve_plugins

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.serve_plugins(fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->serve_plugins: %s\n" % e)
Name Types Notes
fields str [optional]
Return type:
Plugins

Back to top

serve_server_info

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.server_api.serve_server_info(fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->serve_server_info: %s\n" % e)
Name Types Notes
fields str [optional]
Return type:
Server

Back to top

serve_server_version

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

field = 'field_example' # str |

try:
    api_response = tc.server_api.serve_server_version(field)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->serve_server_version: %s\n" % e)
Name Types Notes
field str  
Return type:
str

Back to top

start_backup

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

# username/password authentication
tc = TeamCity("https://teamcity.example.com", auth=('username', 'password'))

file_name = 'file_name_example' # str |  (optional)
add_timestamp = true # bool |  (optional)
include_configs = true # bool |  (optional)
include_database = true # bool |  (optional)
include_build_logs = true # bool |  (optional)
include_personal_changes = true # bool |  (optional)
include_running_builds = true # bool |  (optional)
include_supplimentary_data = true # bool |  (optional)
body = dohq_teamcity.BackupProcessManager() # BackupProcessManager |  (optional)

try:
    api_response = tc.server_api.start_backup(file_name=file_name, add_timestamp=add_timestamp, include_configs=include_configs, include_database=include_database, include_build_logs=include_build_logs, include_personal_changes=include_personal_changes, include_running_builds=include_running_builds, include_supplimentary_data=include_supplimentary_data, body=body)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->start_backup: %s\n" % e)
Name Types Notes
file_name str [optional]
add_timestamp bool [optional]
include_configs bool [optional]
include_database bool [optional]
include_build_logs bool [optional]
include_personal_changes bool [optional]
include_running_builds bool [optional]
include_supplimentary_data bool [optional]
body BackupProcessManager [optional]
Return type:
str

Back to top