
YG790424 (Community Member) asked a question.
I would like to download a scan report in XML or JSON format for a specific Application and build preferably the latest scan/build. I would like to do this from the C# wrapper. My question is what method or methods do I need to invoke from the C# wrapper to obtain this data?
The goal is to be able to create TFS items only for those flaws which I decide are real issues and require a fix. Any help on this would be appreciated.
Thanks, Yaron.
.png)
To use the C# wrapper to download a scan report in XML you can utilize the below commands.
Instructions on Installing the C# wrapper = https://help.veracode.com/reader/orRWez4I0tnZNaA_i0zn9g/Uru2dxuSy~OH34hMPgun~w
You will first need to query to get the buildid & appid for the specific application & scan/test.
1) Get AppId via Getapplist
"C:\Users\Administrator\Downloads\VeracodeC#API>VeracodeC#API.exe -action Getapplist"
Sample Output = C:\Users\Administrator\Downloads\VeracodeC#API>VeracodeC#API.exe -action Getapplist
<?xml version="1.0" encoding="utf-8"?>
<applist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://analysiscenter.veracode.com/schema/2.0/applist" xsi:schemaLocation="https://analysiscenter.veracode.com/schema/2.0/applist https://analysiscenter.veracode.com/resource/2.0/applist.xsd" applist_version="1.2" account_id="123456">
<app app_id="7891011" app_name="Apache" policy_updated_date="2020-08-13T11:25:02-05:00" />
2) Get Build Info
"C:\Users\Administrator\Downloads\VeracodeC#API>VeracodeC#API.exe -action GetBuildInfo -appid 7891011"
Sample Output:
<?xml version="1.0" encoding="utf-8"?>
<buildinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://analysiscenter.veracode.com/schema/4.0/buildinfo" xsi:schemaLocation="https://analysiscenter.veracode.com/schema/4.0/buildinfo https://analysiscenter.veracode.com/resource/4.0/buildinfo.xsd" buildinfo_version="1.4" account_id="123456" app_id="7891011" build_id="109876">......
3) Get Detailed Report in xml
"C:\Users\Administrator\Downloads\VeracodeC#API>VeracodeC#API.exe -action DetailedReport -buildid 109876 -appid 7891011 -format xml -outputfilepath C:\Users\Administrator\Desktop\testdetailedreport.xml"