getbuildinfo.do

APIs

The getbuildinfo call provides information about the most recent or a specific scan of the application.

Before using this API, Veracode strongly recommends that you read API Usage and Access Guidelines.

Resource URL

https://analysiscenter.veracode.com/api/5.0/getbuildinfo.do

Parameters

app_id Integer. Required.
build_id Integer. Defaults to the most recent static scan.
sandbox_id Integer. Optional.

cURL Example

curl --compressed -u <VeracodeUsername>:<VeracodePassword>
          https://analysiscenter.veracode.com/api/5.0/getbuildinfo.do -F "app_id=10886"

cURL Results

The getbuildinfo.do call returns the buildinfo XML document, which references the buildinfo.xsd. Additional buildinfo.xsd schema documentation is available. Use the XSD file to validate the XML data. For more information on build status messages, see API Build Status Information. The following is an example of the returned XML for getbuildinfo.do:
<?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.3" account_id="10241" app_id="13361" build_id="14250">
<build version="Legacy_4Nov2013 Static" build_id="14250" submitter="Veracode" platform="Not Specified" lifecycle_stage="Not Specified" results_ready="true" policy_name="Veracode Recommended Low" policy_version="1" policy_compliance_status="Pass" policy_updated_date="2013-11-04T12:09:13-05:00" rules_status="Pass" grace_period_expired="false" scan_overdue="false" legacy_scan_engine="true">
<analysis_unit analysis_type="Static" published_date="2013-11-04T11:10:04-05:00" published_date_sec="1383581404" status="Results Ready" engine_version="69177"/>
</build>
</buildinfo>

Java Examples

The following example uses the Veracode API ID and key credentials:

java -jar vosp-api-wrappers-java-<version #>.jar -vid <VeracodeApiId> -vkey <VeracodeApiKey> -action getbuildinfo –appid <app id>

The following example uses the Veracode username and password:

java -jar vosp-api-wrappers-java-<version #>.jar -vuser <VeracodeUsername> -vpassword <VeracodePassword> -action getbuildinfo –appid <app id>

Java Results

The getbuildinfo.do call returns the buildinfo XML document, which references the buildinfo.xsd. The following is an example of the returned XML.

<build build_id="1112223" grace_period_expired="true" legacy_scan_engine="false" lifecycle_stage="Not Specified" platform="Not Specified" 
policy_compliance_status="Did Not Pass" policy_name="Scan Policy" policy_updated_date="2018-11-04T23:29:42-05:00" policy_version="8" 
results_ready="true" rules_status="Did Not Pass" scan_overdue="false" submitter=”John Smith" version="Scan#1">
<analysis_unit analysis_type="Static" engine_version="120233" published_date="2019-03-121T12:16:03-05:00" published_date_sec="1519924563" status="Results Ready"/>
</build>
</buildinfo>