Skip to content

Commit

Permalink
Merge pull request #81 from aszaryk/patch-1
Browse files Browse the repository at this point in the history
Update dynamic.py
  • Loading branch information
tjarrettveracode authored May 6, 2024
2 parents f048efa + 5bd2028 commit 5a2ea76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions veracode_api_py/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,16 @@ def get_all(self):

def create(self,reference_key: str,value: str,description: str):
payload = {'reference_key':reference_key, 'value': value, 'description': description}
return APIHelper()._rest_request(self.base_url,'POST',json.dumps(payload))
return APIHelper()._rest_request(self.base_url,'POST',body=json.dumps(payload))

def get(self,guid: UUID):
uri = self.base_url + '/{}'.format(guid)
return APIHelper()._rest_request(uri,"GET")

def update(self,guid: UUID,reference_key: str,value: str,description: str):
uri = self.base_url + '/{}'.format(guid)
uri = self.base_url + '/{}'.format(guid) + "?method=PATCH"
body = { 'reference_key': reference_key, 'value': value, 'description': description }
return APIHelper()._rest_request(uri,"PUT",body)
return APIHelper()._rest_request(uri,"PUT",body=json.dumps(body))

def delete(self,guid: UUID):
uri = self.base_url + '/{}'.format(guid)
Expand Down Expand Up @@ -310,4 +310,4 @@ def setup_scan(self, scan_config_request, scan_contact_info=None, linked_app_gui
payload.update({'linked_platform_app_uuid': linked_app_guid})
return payload
def start_scan(self, length, unit):
return { 'schedule': {'now': True, 'duration':{'length': length,'unit': unit }} }
return { 'schedule': {'now': True, 'duration':{'length': length,'unit': unit }} }

0 comments on commit 5a2ea76

Please sign in to comment.