- Checkmarx Documentation
- Checkmarx SAST
- SAST API Guide
- CxSAST (SOAP) API
- Working with Scans
- Adding a Scan Comment
Adding a Scan Comment
The API client can add a comment to scan results. If there is already a comment, it will be overwritten.
CxSDKWebService.UpdateScanComment Method
public CxWSBasicRepsonse UpdateScanComment( string sessionID, long ScanID, string Comment );
Parameters
sessionID: The current Session ID.
ScanID: The ScanID of the scan to which to add the comment
Example
To add a comment to the results of a scan with known ID of 350:
internal void Main(string [] args) { String sessionID = args[0]; CxSDKWebServiceSoapClient cxSDKProxy = new CxSDKWebServiceSoapClient(); long scanID = 350; //Create the comment string scanComment = string.Concat("The Scan ID of this scan is" , scanID.ToString()); CxWSBasicRepsonse response =cxSDKProxy.UpdateScanComment(sessionID, scanID, scanComment); UpdateSucceded = response.IsSuccesfull; }
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.
UpdateScanComment | PATCH /sast/scans/{id} | Add a comment to a specific scan. Parameters include - comment. |
For more mapping information, refer to API Mapping (SOAP to REST). You can also find a summary of our REST APIs here.
In this section: