Skip to main content

Getting Scan Status and Details

After running a scan, The API client can get the scan status and its details. To do this, the API will first need the scan's Run ID.

The obtained details include the scan's Scan ID, which can be subsequently used for commenting and reports.

CxSDKWebService.GetStatusOfSingleScan Method

public CxWSResponseScanStatus GetStatusOfSingleScan(
   string sessionID,
   string runId
);

Parameters

Return Value

CxWSResponseScanStatus, including:

  • .CurrentStatus: The scan's status

  • .ScanID: Once the scan is complete, .ScanID contains an ID that enables subsequent methods for commenting and reporting.

Example

To get the status and details of a scan with a known Run ID:

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

    //the scan's known identifier
    string scanRunID = "d95d56a2-2d8c-4e61-8146-0822213549f8";

    CxWSResponseScanStatus response = cxSDKProxy.GetStatusOfSingleScan(sessionID, scanRunID);

    //store the scan's current state
    CurrentStatus = response.CurrentStatus;
}

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.

GetStatusOfSingleScan

GET /sast/scansQueue/{Id}

Get details of a specific scan in the scans queue.

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