Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

/rest/{version}/scans/{scanId}/download

Descriptor

Value

HTTP Method

GET

Description

Outputs the scan file associated with the given Scan ID and name. Be sure to pipe the response into a file.

Required Permission

Download Scans

Version Introduced

2.5.0.2

Changes in 2.5.1.13

Adds a new parameter to get scan files without needing names.

Changes in 2.8

Changed required permission.

Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

A value of ‘application/json’ must be provided.

Request GET Parameters

Parameter

Value

Required

Description

scanFileName

String

Yes*

File name of the original file uploaded to ThreadFix.

file

Integer

Yes*

Index of the file to download if there were multiple files uploaded as one scan.  Otherwise use file=0.

*Either scanFileName or file must be provided, but not both. 

Sample Calls:

Code Block
curl --insecure -H 'Accept: application/json' -H 'Authorization: APIKEY {apiKey}' http://localhost:8080/threadfix/rest/latest/scans/34/download?&scanFileName=appscan-php-demo.xml > appscan-php-demo.xml
Code Block
curl --insecure -H 'Accept: application/json' -H 'Authorization: APIKEY {apiKey}' http://localhost:8080/threadfix/rest/latest/scans/34/download?&file=0 > appscan-php-demo.xml

Sample Output:

The output for this REST call is the scan file the user wishes to download.  Ensure it is piped into the proper file type (xml, fpr, zip, etc.).

Page Tree
rootScans 3.0 API