SecurityCenter API: Scan Result

/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}

Methods
GET

Gets the Scan Result associated with {id}.

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
progress

Legend

* = always comes back

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

None

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "11",
		"name" : "Weekly Scan",
		"description" : "",
		"details" : "Policy 'Basic 1'",
		"status" : "Completed",
		"importStatus" : "Error",
		"importStart" : "1424815361",
		"importFinish" : "-1",
		"importDuration" : -1,
		"downloadAvailable" : "false",
		"downloadFormat" : "v2",
		"dataFormat" : "IPv4",
		"resultType" : "active",
		"resultSource" : "internal",
		"running" : "false",
		"errorDetails" : "",
		"importErrorDetails" : "Scan import error (code #139).",
		"totalIPs" : "200",
		"scannedIPs" : "200",
		"startTime" : "1424815208",
		"finishTime" : "1424815360",
		"scanDuration" : 152,
		"completedIPs" : "200",
		"completedChecks" : "10600",
		"totalChecks" : "10600",
		"progress" : {
			"completedIPs" : "200",
			"completedChecks" : "10600",
			"totalChecks" : "10600",
			"checksPerHost" : "53",
			"totalIPs" : "200",
			"runState" : "Stopped",
			"scanningIPs" : "",
			"scanningSize" : 0,
			"scannedIPs" : 192.168.0.0",
			"scannedSize" : 29,
			"awaitingDownloadIPs" : "",
			"awaitingDownloadSize" : 0,
			"distributedSize" : 200,
			"status" : "Completed",
			"deadHostSize" : 171,
			"deadHostIPs" : "192.168.0.0",
			"scanners" : [
				{
					"id" : "12",
					"loadAvg" : "0.0",
					"chunkCompleted" : "120",
					"completedChecks" : "6360",
					"chunks" : [
						{
							"id" : "1",
							"name" : "fc136656-2ddd-58ab-bccc-78ad4c125567-130064/Chunk 1.",
							"ips" : "192.168.0.0",
							"size" : "1",
							"completedHosts" : "0",
							"completedChecks" : "1",
							"scanningIPs" : "192.168.0.0",
							"canningSize" : "1",
							"scannedIPs" : "",
							"scannedSize" : "0",
							"status" : "Running",
							"startTime" : "1455735612",
							"endTime" : "1455736826",
							"deadHostIPs" : "",
							"deadHostSize" : 0
						}
					],
					"scannedSize" : 11,
					"scannedIPs" : "192.168.0.0",
					"scanningSize" : 0,
					"scanningIPs" : "",
					"awaitingDownloadSize" : 0,
					"awaitingDownloadIPs" : "",
					"deadHostSize" : 109,
					"deadHostIPs" : "192.168.0.0",
					"distributedSize" : 120
				},
				{
					"id" : "15",
					"loadAvg" : "0.0",
					"chunkCompleted" : "80",
					"completedChecks" : "4240",
					"chunks" : [],
					"scannedSize" : 18,
					"scannedIPs" : "192.168.0.0",
					"scanningSize" : 0,
					"scanningIPs" : "",
					"awaitingDownloadSize" : 0,
					"awaitingDownloadIPs" : "",
					"deadHostSize" : 62,
					"deadHostIPs" : "192.168.0.0",
					"distributedSize" : 80
				}
			]
		},
		"initiator" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "Security Manager",
			"lastname" : ""
		},
		"owner" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "Security Manager",
			"lastname" : ""
		},
			"ownerGroup" : {
			"id" : "0",
			"name" : "Full Access",
			"description" : "Full Access group"
		},
			"scan" : {
			"id" : -1,
			"name" : "",
			"description" : ""
		},
		"repository" : {
			"id" : "38",
			"name" : "jm ipv4",
			"description" : "copied from 97"
		}
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1426878968
}

DELETE

Deletes the Scan Result associated with {id}, depending on access and permissions.

Request Parameters

None

Example Response
Expand
{
    "type" : "regular",
    "response" : "",
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1403100582
}

/scanResult/{id}/copy

Methods

POST

Copies the Scan Result associated with {id}, depending on access and permissions.

Request Parameters
Expand
{
	"users" : [
		{
			"id" : <number>
		}...
	]
}
Example Response
Expand
{
    "type" : "regular",
    "response" : {},
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1406924039
}

/scanResult/{id}/email

Methods

 

POST

Copies the Scan Result associated with {id}, depending on access and permissions.

Request Parameters
Expand
{
	"email" : <string> (valid email list)
}
Example Response
Expand
{
    "type" : "regular",
    "response" : {},
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1406924039
}

/scanResult/import

Methods
 
POST

Imports the Scan Result associated with the uploaded file, identified by filename.

Request Parameters
Expand
{
	"filename" : <string>,
	"repository" : {
		"id" : <number>
	},
	"classifyMitigatedAge" : <number> DEFAULT "0",
	"dhcpTracking" : <string> "false" | "true" DEFAULT "false",
	"scanningVirtualHosts" : <string> "false" | "true" DEFAULT "false"
}
Example Response
Expand
{
	"type" : "regular",
	"response" : "",
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1407268778
}

/scanResult/{id}/import

Methods
POST

Re-imports the Scan Result associated with {id}.

Request Parameters
Expand
{
	"classifyMitigatedAge" : <number> DEFAULT "0",
	"dhcpTracking" : <string> "false" | "true" DEFAULT "false",
	"scanningVirtualHosts" : <string> "false" | "true" DEFAULT "false"
}
Example Response
Expand
{
	"type" : "regular",
	"response" : "",
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1407268778
}

/scanResult/{id}/stop

Methods
POST

Stops the Scan Result associated with {id}.

NOTE: This endpoint is not applicable for Agent Results, and it is disabled as such.

Request Parameters

None

Example Response
Expand
{
    "type" : "regular",
    "response" : {},
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1406918252
}

/scanResult/{id}/pause

Methods
POST

Pauses the Scan Result associated with {id}.

NOTE: This endpoint is not applicable for Agent Results, and it is disabled as such.

Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"scanResults" : [
			"1"
		]
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1406917515
}

/scanResult/{id}/resume

Methods
POST

Resumes the Scan Result associated with {id}.

NOTE: This endpoint is not applicable for Agent Results, and it is disabled as such.

Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"scanResults" : [
			"1"
		]
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1406917515
}

/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.