dohq_teamcity.GroupApi

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/GroupApi and model examples
  • This is autogenerated page, don’t change them directly, use template. Read more in Development
Method HTTP request
add_group POST /app/rest/userGroups
add_role POST /app/rest/userGroups/{groupLocator}/roles
add_role_simple POST /app/rest/userGroups/{groupLocator}/roles/{roleId}/{scope}
delete_group DELETE /app/rest/userGroups/{groupLocator}
delete_role DELETE /app/rest/userGroups/{groupLocator}/roles/{roleId}/{scope}
get_parent_groups GET /app/rest/userGroups/{groupLocator}/parent-groups
get_permissions GET /app/rest/userGroups/{groupLocator}/debug/permissions
get_properties GET /app/rest/userGroups/{groupLocator}/properties
list_role GET /app/rest/userGroups/{groupLocator}/roles/{roleId}/{scope}
list_roles GET /app/rest/userGroups/{groupLocator}/roles
put_user_property PUT /app/rest/userGroups/{groupLocator}/properties/{name}
remove_user_property DELETE /app/rest/userGroups/{groupLocator}/properties/{name}
serve_group GET /app/rest/userGroups/{groupLocator}
serve_groups GET /app/rest/userGroups
serve_user_properties GET /app/rest/userGroups/{groupLocator}/properties/{name}
set_parent_groups PUT /app/rest/userGroups/{groupLocator}/parent-groups
set_roles PUT /app/rest/userGroups/{groupLocator}/roles

add_group

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.Group() # Group |  (optional)
fields = 'fields_example' # str |  (optional)

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

Back to top

add_role

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
body = dohq_teamcity.Role() # Role |  (optional)

try:
    api_response = tc.group_api.add_role(group_locator, body=body)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->add_role: %s\n" % e)
Name Types Notes
group_locator str  
body Role [optional]
Return type:
Role

Back to top

add_role_simple

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |

try:
    api_response = tc.group_api.add_role_simple(group_locator, role_id, scope)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->add_role_simple: %s\n" % e)
Name Types Notes
group_locator str  
role_id str  
scope str  
Return type:
Role

Back to top

delete_group

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |

try:
    tc.group_api.delete_group(group_locator)
except ApiException as e:
    print("Exception when calling GroupApi->delete_group: %s\n" % e)
Name Types Notes
group_locator str  
Return type:
void (empty response body)

Back to top

delete_role

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |

try:
    tc.group_api.delete_role(group_locator, role_id, scope)
except ApiException as e:
    print("Exception when calling GroupApi->delete_role: %s\n" % e)
Name Types Notes
group_locator str  
role_id str  
scope str  
Return type:
void (empty response body)

Back to top

get_parent_groups

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.group_api.get_parent_groups(group_locator, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->get_parent_groups: %s\n" % e)
Name Types Notes
group_locator str  
fields str [optional]
Return type:
Groups

Back to top

get_permissions

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |

try:
    api_response = tc.group_api.get_permissions(group_locator)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->get_permissions: %s\n" % e)
Name Types Notes
group_locator str  
Return type:
str

Back to top

get_properties

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.group_api.get_properties(group_locator, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->get_properties: %s\n" % e)
Name Types Notes
group_locator str  
fields str [optional]
Return type:
Properties

Back to top

list_role

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
role_id = 'role_id_example' # str |
scope = 'scope_example' # str |

try:
    api_response = tc.group_api.list_role(group_locator, role_id, scope)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->list_role: %s\n" % e)
Name Types Notes
group_locator str  
role_id str  
scope str  
Return type:
Role

Back to top

list_roles

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |

try:
    api_response = tc.group_api.list_roles(group_locator)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->list_roles: %s\n" % e)
Name Types Notes
group_locator str  
Return type:
Roles

Back to top

put_user_property

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
name = 'name_example' # str |
body = 'body_example' # str |  (optional)

try:
    api_response = tc.group_api.put_user_property(group_locator, name, body=body)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->put_user_property: %s\n" % e)
Name Types Notes
group_locator str  
name str  
body str [optional]
Return type:
str

Back to top

remove_user_property

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
name = 'name_example' # str |

try:
    tc.group_api.remove_user_property(group_locator, name)
except ApiException as e:
    print("Exception when calling GroupApi->remove_user_property: %s\n" % e)
Name Types Notes
group_locator str  
name str  
Return type:
void (empty response body)

Back to top

serve_group

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
fields = 'fields_example' # str |  (optional)

try:
    api_response = tc.group_api.serve_group(group_locator, fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->serve_group: %s\n" % e)
Name Types Notes
group_locator str  
fields str [optional]
Return type:
Group

Back to top

serve_groups

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.group_api.serve_groups(fields=fields)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->serve_groups: %s\n" % e)
Name Types Notes
fields str [optional]
Return type:
Groups

Back to top

serve_user_properties

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
name = 'name_example' # str |

try:
    api_response = tc.group_api.serve_user_properties(group_locator, name)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->serve_user_properties: %s\n" % e)
Name Types Notes
group_locator str  
name str  
Return type:
str

Back to top

set_parent_groups

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
body = dohq_teamcity.Groups() # Groups |  (optional)
fields = 'fields_example' # str |  (optional)

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

Back to top

set_roles

from pprint import pprint
from dohq_teamcity import TeamCity, ApiException

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

group_locator = 'group_locator_example' # str |
body = dohq_teamcity.Roles() # Roles |  (optional)

try:
    api_response = tc.group_api.set_roles(group_locator, body=body)
   pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->set_roles: %s\n" % e)
Name Types Notes
group_locator str  
body Roles [optional]
Return type:
Roles

Back to top