Skip to main content

Deleting a Scan

The API client can delete requested scans. Scans that are currently running won't be deleted. If there's even a single scan that the user can't delete (due to security reasons) the operation will fail and an error message is returned.

cxSDKProxy.DeleteScans Method

public CxWSBasicRepsonse DeleteScan(
   string sessionID,
   long scanIDs,
);

Parameters

  • sessionID: The current Session ID.

  • scanIDs: The scan unique id.

If there were any errors set CxWSBasicRepsonse.IsSuccesfull to false, specify the error in the CxWSBasicRepsonse.ErrorMessage

Return Value

If there are any errors, the return value parameter “CxWSBasicRepsonse.IsSuccesfull” is set to false and the second parameter “CxWSBasicRepsonse.ErrorMessage” indicates the reason for failure.

Example

To delete single or multiple scans:

internal void Main(string [] args)
   {
   String sessionID = args[0];

   CxSDKWebService cxSDKProxy = new CxSDKWebService();

   //the scans unique id 
    long[] scanIDs = new long[]{1,2,3};

   //cancel the scan
   CxWSBasicRepsonse response = cxSDKProxy.DeleteScans(sessionID, scanIDs); 
}

SOAP to REST Mapping

This section covers SOAP to REST migration and mapping of our legacy SOAP based SDK to the new REST APIs. It is recommended to use this reference only once CxSAST V8.8.0 is installed.

DeleteScans

DELETE /sast/scans/{id}

Delete a specific scan.

For more mapping information, refer to API Mapping (SOAP to REST). You can also find a summary of our REST APIs here.