diff --git a/veracode_api_py/dynamic.py b/veracode_api_py/dynamic.py index f8bb77a..c97b19d 100644 --- a/veracode_api_py/dynamic.py +++ b/veracode_api_py/dynamic.py @@ -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) @@ -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 }} } \ No newline at end of file + return { 'schedule': {'now': True, 'duration':{'length': length,'unit': unit }} }