Scan Result REST Reference

/scanResult

Methods
GET

Gets the list of Scan Results.

Fields Parameter
Expand

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

Allowed Fields

*id
**name
**description
**status
initiator
owner
ownerGroup
repository
scan
job
details
importStatus
importStart
importFinish
importDuration?downloadAvailable
downloadFormat
dataFormat
resultType
resultSource
running
errorDetails
importErrorDetails
totalIPs
scannedIPs
startTime
finishTime
scanDuration?completedIPs
completedChecks
totalChecks

Note: field "progress" not allowed. To get this field, you must specify a specific scanResult (id).

Legend

* = always comes back

** = comes back if fields list not specified on GET all
Request Parameters
Expand

NOTE: The 'startTime' and 'endTime' parameters search against the 'createdTime' values. They do not consider or search against the 'finishTime' values.

{
	"startTime" : <number:epoch> DEFAULT {now-30 days},
	"endTime" : <number:epoch> DEFAULT {now}
}
Filter Parameters

usable - The response will be an object containing an array of usable Scan Results. By default, both usable and manageable objects are returned.
manageable - The response will be an object containing all manageable Scan Results. By default, both usable and manageable objects are returned.
running - Only Scan Results that are currently running will be returned. This is compatible with usable and/or manageable filters. By default, both running and completed Scan Results are returned.
completed - Only Scan Results that have completed will be returned. This is compatible with usable and/or manageable filters. By default, both running and completed Scan Results are returned.

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"usable" : [
			{
				"id" : "1",
				"name" : "Test Scan",
				"description" : "",
				"status" : "Completed"
			}
		],
		"manageable" : [
			{
				"id" : "1",
				"name" : "Test Scan",
				"description" : "",
				"status" : "Completed"
			}
		]
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1407249641
}

/scanResult/{id}/download

Methods
POST

Downloads the Scan Result associated with {id}.

Request Parameters
Expand
{
	"downloadType" : <string> "scap1_2" | "v2" DEFAULT "v2"
}
Example Response

None given. The response will be a scan file in binary or ascii format.