Skip to main content

Scan a resource now

POST 

/api/v1/HostScanJob/:hostScanJobId

Starts a scan of the host behind a resource, using the resource service account, and returns the scan job status. Use it to refresh what the system knows about a resource right away. In this operation the hostScanJobId path segment holds the ID of a managed resource, not the ID of a scan job; the response carries the ID of the new scan job.

Permission required: Admin or App role.

Values for status: -4 = Paused, -3 = Scheduled, -2 = Unknown, -1 = Pending, 0 = Queued, 1 = Running, 2 = Complete, 3 = Failed, 4 = Cancelled, 5 = CompletedWithErrors, 6 = CompletedNotRun.

Request​

Responses​

The body is the scan job status: the job ID, an overall status and description, and a status entry for each host. Use the job ID in the body to check progress.