Skip to content

Commit

Permalink
Merge pull request #28 from bmrvilela/master
Browse files Browse the repository at this point in the history
Add option to fetch all queries by version
  • Loading branch information
portilha authored Jul 17, 2024
2 parents e6bb08b + fa24b0d commit 01cc90e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Checkmarx.API/CxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3496,17 +3496,20 @@ public int GetTotalConfirmedResultsForScan(long scanId)
/// Get the all query groups of the CxSAST server.
/// </summary>
/// <returns></returns>
public cxPortalWebService93.CxWSQueryGroup[] GetQueries()
public cxPortalWebService93.CxWSQueryGroup[] GetQueries(bool includeAllQueryVersions = false)
{
checkConnection();

var result = _cxPortalWebServiceSoapClientV9.GetQueryCollectionAsync(_soapSessionId).Result;
cxPortalWebService93.CxQueryCollectionResponse result = null;
if (includeAllQueryVersions)
result = _cxPortalWebServiceSoapClientV9.GetQueryCollectionWithInactiveAsync(_soapSessionId).Result;
else
result = _cxPortalWebServiceSoapClientV9.GetQueryCollectionAsync(_soapSessionId).Result;

if (!result.IsSuccesfull)
throw new ApplicationException(result.ErrorMessage);

return result.QueryGroups;

}

public CxAuditWebServiceV9.CxWSQueryGroup[] GetAuditQueries()
Expand Down

0 comments on commit 01cc90e

Please sign in to comment.