public final class ResultsAPIWrapper extends AbstractAPIWrapper
Provides access to the Veracode Results API. You can use the Veracode Results API to access your application assessment data from another application or a script. For instance, you can write a script to automatically download newly published results into a bug tracking system. Information about application profiles, completed and in progress builds, and detailed application results data (including call stacks) or summary results data can be retrieved in XML format via the Veracode Results API. You can also download the XML results data directly from the application's report page without using the API.
To access the Results API, you must first configure a login for API access.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DETAILED_REPORT_PDF_URI |
static java.lang.String |
DETAILED_REPORT_URI |
static java.lang.String |
GET_ACC_CUSTOMFIELD_LIST_URI |
static java.lang.String |
GET_APP_BUILDS_URI |
static java.lang.String |
GET_CALL_STACKS_URI |
static java.lang.String |
SUMMARY_REPORT_PDF_URI |
static java.lang.String |
SUMMARY_REPORT_URI |
static java.lang.String |
THIRD_PARTY_REPORT_PDF_URI |
BASE_ADDRESS
Constructor and Description |
---|
ResultsAPIWrapper() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
detailedReport(java.lang.String build_id)
Returns a detailed XML report of the scan results for the specified
build.
|
byte[] |
detailedReportPdf(java.lang.String build_id)
Downloads a PDF report of the detailed scan results for the specified
build.
|
java.lang.String |
getAccountCustomFieldList()
Retrieves the custom field list for the account user belongs to.
|
java.lang.String |
getAppBuilds()
Compiles a detailed list of applications and statuses, including all the
application and build profile data.
|
java.lang.String |
getAppBuilds(java.lang.String report_changed_since,
java.lang.String only_latest,
java.lang.String include_in_progress)
Compiles a detailed list of applications and statuses, including all the
application and build profile data.
|
java.lang.String |
getCallStacks(java.lang.String build_id,
java.lang.String flaw_id)
Retrieves the call stacks for a specified flaw in a specific build.
|
java.lang.String |
summaryReport(java.lang.String build_id)
Returns a summary XML report of the scan results for the specified build.
|
byte[] |
summaryReportPdf(java.lang.String build_id)
Downloads a PDF summary report of the scan results for the specified
build.
|
byte[] |
thirdPartyReportPdf(java.lang.String build_id)
Downloads a PDF file of the scan results for the specified build of a
third-party application.
|
setUpApiCredentials, setUpCredentials, setUpProxy, setUpProxy, setUpProxy
public static final java.lang.String DETAILED_REPORT_URI
public static final java.lang.String DETAILED_REPORT_PDF_URI
public static final java.lang.String GET_APP_BUILDS_URI
public static final java.lang.String GET_CALL_STACKS_URI
public static final java.lang.String SUMMARY_REPORT_URI
public static final java.lang.String SUMMARY_REPORT_PDF_URI
public static final java.lang.String THIRD_PARTY_REPORT_PDF_URI
public static final java.lang.String GET_ACC_CUSTOMFIELD_LIST_URI
public java.lang.String detailedReport(java.lang.String build_id) throws java.io.IOException
Returns a detailed XML report of the scan results for the specified build.
Calls this URL: https://analysiscenter.veracode.com/api/5.0/detailedreport.do Schema File: https://analysiscenter.veracode.com/resource/detailedreport.xsd
build_id
- Required. A String that represents an Integer value.java.io.IOException
public byte[] detailedReportPdf(java.lang.String build_id) throws java.io.IOException
Downloads a PDF report of the detailed scan results for the specified build.
Calls this URL: https://analysiscenter.veracode.com/api/4.0/detailedreportpdf.do
build_id
- Required. A String that represents an Integer value.java.io.IOException
public java.lang.String getAppBuilds() throws java.io.IOException
Compiles a detailed list of applications and statuses, including all the application and build profile data. By default, only build data for the latest builds with scan reports that have been published or scan reports that have changed within the last 31 days is included. To obtain data more quickly for all applications and builds, Veracode recommends that you use getapplist.do to generate a list of all applications and getbuildlist.do to generate a list of all builds for an application. You can then use getappinfo.do and getbuildinfo.do to retrieve the data about specific applications and builds.
Calls this URL: https://analysiscenter.veracode.com/api/4.0/getappbuilds.do Schema File: https ://analysiscenter.veracode.com/resource/2.0/applicationbuilds.xsd
java.io.IOException
public java.lang.String getAppBuilds(java.lang.String report_changed_since, java.lang.String only_latest, java.lang.String include_in_progress) throws java.io.IOException
Compiles a detailed list of applications and statuses, including all the application and build profile data. By default, only build data for the latest builds with scan reports that have been published or scan reports that have changed within the last 31 days is included. To obtain data more quickly for all applications and builds, Veracode recommends that you use getapplist.do to generate a list of all applications and getbuildlist.do to generate a list of all builds for an application. You can then use getappinfo.do and getbuildinfo.do to retrieve the data about specific applications and builds.
Calls this URL: https://analysiscenter.veracode.com/api/4.0/getappbuilds.do Schema File: https ://analysiscenter.veracode.com/resource/2.0/applicationbuilds.xsd
report_changed_since
- Optional. Validates against the MM/dd/yyyy date format.
Defaults to the date 31 days ago. Build data is included only
for builds with scan reports that have been published or scan
reports that have changed since the specified date. The
following events cause a change to a build's scan report:
acceptance of a flaw mitigation for a flaw relevant to the
scan report, rejection of a previously accepted flaw
mitigation for a flaw relevant to the scan report, or, if the
build's scan report is the latest within its application
profile, a policy change to the build's application profile.only_latest
- Optional. A String that represents a Boolean value. Defaults
to true. If set to false, build data is included for previous
builds with published scan reports.include_in_progress
- Optional. A String that represents a Boolean value. Defaults
to false. If set to true, build data is included for builds
with unpublished scan reports. To retrieve build data only for
builds with unpublished scan reports, set include_in_progress
to true and report_changed_since to a future date.java.io.IOException
public java.lang.String getCallStacks(java.lang.String build_id, java.lang.String flaw_id) throws java.io.IOException
Retrieves the call stacks for a specified flaw in a specific build.
Calls this URL: https://analysiscenter.veracode.com/api/5.0/getcallstacks.do Schema File: https://analysiscenter.veracode.com/resource/2.0/callstacks.xsd
build_id
- Required. A String that represents an Integer value.flaw_id
- Required. A String that represents an Integer value.java.io.IOException
public java.lang.String summaryReport(java.lang.String build_id) throws java.io.IOException
Returns a summary XML report of the scan results for the specified build.
Calls this URL: https://analysiscenter.veracode.com/api/4.0/summaryreport.do Schema File: https://analysiscenter.veracode.com/resource/summaryreport.xsd
build_id
- Required. A String that represents an Integer value.java.io.IOException
public byte[] summaryReportPdf(java.lang.String build_id) throws java.io.IOException
Downloads a PDF summary report of the scan results for the specified build.
Calls this URL: https://analysiscenter.veracode.com/api/4.0/summaryreportpdf.do
build_id
- Required. A String that represents an Integer value.java.io.IOException
public byte[] thirdPartyReportPdf(java.lang.String build_id) throws java.io.IOException
Downloads a PDF file of the scan results for the specified build of a third-party application.
Calls this URL: https://analysiscenter.veracode.com/api/4.0/thirdpartyreportpdf.do
build_id
- Required. A String that represents an Integer value.java.io.IOException
public java.lang.String getAccountCustomFieldList() throws java.io.IOException
Retrieves the custom field list for the account user belongs to.
Calls this URL: https://analysiscenter.veracode.com/api/5.0/getaccountcustomfieldlist.do Schema File: https://analysiscenter.veracode.com/resource/accountcustomfieldlist.xsd
java.io.IOException