getfilelist.do

APIs

The getfilelist.do call compiles a list of the files that were uploaded for a static scan. The returned XML provides MD5 checksums for these files, where available.

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

Resource URL

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

Parameters

app_id Integer. Required.
build_id Integer. Defaults to the most recent build.
sandbox_id Integer. Optional. Enter the ID of the sandbox for which you want to create a list of files.

cURL Example

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

Results

The getfilelist.do call returns the filelist XML document, which references the filelist.xsd. Use the XSD file to validate the XML data. The following is an example of the returned XML:
<filelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://analysiscenter.veracode.com/schema/2.0/filelist" ​ xsi:schemaLocation="https://analysiscenter.veracode.com/schema/2.0/filelist https://analysiscenter.veracode.com/resource/2.0/filelist.xsd" filelist_version="1.1" account_id="10043" app_id=<app id> build_id="10361">
          <file file_id="24402" file_name="junit-3.8.1.jar" file_status="Uploaded" file_md5="8325a36d79c4a4e7158a1c022dd08dfe"/>
          <file file_id="24403" file_name="javascans.jar" file_status="Uploaded" file_md5="1307b200c667f1e79c15309cd33dea87"/>
          <file file_id="24404" file_name="jaxb-xjc.jar" file_status="Uploaded" file_md5="bb392d0e15f0f398bc2182ed8a801bb4"/>
          <file file_id="24405" file_name="jetty-5.1.4.jar" file_status="Uploaded" file_md5="f6eab123568eb799d9bfd847a3871fb7"/>
          </filelist>

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 getfilelist –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 getfilelist –appid <app id>

Java Results

The getfilelist.do call returns the filelist XML document, which references the filelist.xsd. The following is an example of the returned XML.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<filelist xmlns="https://analysiscenter.veracode.com/schema/2.0/filelist" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
account_id="12345" app_id="202545" build_id="1112233" filelist_version="1.1" xsi:schemaLocation="https://analysiscenter.veracode.com/schema/2.0/filelist 
https://analysiscenter.veracode.com/resource/2.0/filelist.xsd">
<file file_id="1234567890" file_md5="hgfd2dddg91fc5b4034h78a4b02d74n732" file_name="MyApp-5.0-with-jsp.war" file_status="Uploaded"/>
</filelist>