Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions veracode_api_py/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ def delete(self,user_guid: UUID):
return APIHelper()._rest_request(uri,"DELETE")

class Teams():
def get_by_name(self, team_name, all_for_org=False):
#Gets a list of teams matching a team_name using the Veracode Identity API
request_params = {'team_name': parse.quote(team_name), 'page': 0}
if all_for_org:
request_params.update({'all_for_org': True})
return APIHelper()._rest_paged_request("api/authn/v2/teams","GET","teams",request_params)


def get_all(self, all_for_org=False):
#Gets a list of teams using the Veracode Identity API
if all_for_org:
Expand Down Expand Up @@ -208,6 +216,11 @@ def delete(self, team_guid: UUID):
class BusinessUnits():
base_uri = "api/authn/v2/business_units"

def get_by_name(self, bu_name):
#Gets a list of business units matching a bu_name using the Veracode Identity API
request_params = {'bu_name': parse.quote(bu_name), 'page': 0}
return APIHelper()._rest_paged_request(self.base_uri,"GET","business_units",request_params)

def get_all(self):
request_params = {'page': 0}
return APIHelper()._rest_paged_request(self.base_uri,"GET","business_units",request_params)
Expand Down
Loading