@@ -26,7 +26,7 @@ def __init__(
2626 self .scan_config = scan_config
2727
2828 self ._SCAN_SERVICE_CLI_CONTROLLER_PATH = 'api/v1/cli-scan'
29- self ._SCAN_SERVICE_V2_CLI_CONTROLLER_PATH = 'api/v2/ cli-scan '
29+ self ._SCAN_SERVICE_V4_CLI_CONTROLLER_PATH = 'api/v4/scans/ cli'
3030 self ._DETECTIONS_SERVICE_CLI_CONTROLLER_PATH = 'api/v1/detections/cli'
3131 self ._POLICIES_SERVICE_CONTROLLER_PATH_V3 = 'api/v3/policies'
3232
@@ -58,9 +58,9 @@ def get_scan_aggregation_report_url(self, aggregation_id: str, scan_type: str) -
5858 )
5959 return models .ScanReportUrlResponseSchema ().build_dto (response .json ())
6060
61- def get_scan_service_v2_url_path (self , scan_type : str ) -> str :
61+ def get_scan_service_v4_url_path (self , scan_type : str ) -> str :
6262 service_path = self .scan_config .get_service_name (scan_type )
63- return f'{ service_path } /{ self ._SCAN_SERVICE_V2_CLI_CONTROLLER_PATH } '
63+ return f'{ service_path } /{ self ._SCAN_SERVICE_V4_CLI_CONTROLLER_PATH } '
6464
6565 def get_zipped_file_scan_async_url_path (self , scan_type : str , should_use_sync_flow : bool = False ) -> str :
6666 async_scan_type = self .scan_config .get_async_scan_type (scan_type )
@@ -131,7 +131,7 @@ def zipped_file_scan_async(
131131
132132 def get_upload_link (self , scan_type : str ) -> models .UploadLinkResponse :
133133 async_scan_type = self .scan_config .get_async_scan_type (scan_type )
134- url_path = f'{ self .get_scan_service_v2_url_path (scan_type )} /{ async_scan_type } /upload-link'
134+ url_path = f'{ self .get_scan_service_v4_url_path (scan_type )} /{ async_scan_type } /upload-link'
135135 response = self .scan_cycode_client .get (url_path = url_path , hide_response_content_log = self ._hide_response_log )
136136 return models .UploadLinkResponseSchema ().load (response .json ())
137137
@@ -150,7 +150,7 @@ def scan_repository_from_upload_id(
150150 is_commit_range : bool = False ,
151151 ) -> models .ScanInitializationResponse :
152152 async_scan_type = self .scan_config .get_async_scan_type (scan_type )
153- url_path = f'{ self .get_scan_service_v2_url_path (scan_type )} /{ async_scan_type } /repository'
153+ url_path = f'{ self .get_scan_service_v4_url_path (scan_type )} /{ async_scan_type } /repository'
154154 response = self .scan_cycode_client .post (
155155 url_path = url_path ,
156156 data = {
0 commit comments