Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed typos in the curls, per TFSP-6988

/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 that was 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
themeEclipse
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

themeEclipse

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 you want to download.  Make sure you pipe it into the proper file type (xml, fpr, zip, etc.).

Page Tree
rootScans API