Get the latest scan job status for a host
GET/api/v1/HostScanJob/ByHostId/:hostId
Returns the status of the most recent host scan job for the given host. Use it to check whether a scan of that host is queued, running or finished.
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.
Values for failureReason: 0 = NoError, 1 = UnknownError, 2 = SystemError, 3 = ActionServiceUnavailable, 4 = ActionTimeout, 5 = AccessDenied, 6 = UserAlreadyMemberofGroup, 7 = UserNotMemberofGroup, 8 = InvalidGroupName, 9 = InvalidUserName, 10 = InvalidHostName, 11 = FailedToConnect.
Request
Responses
- 200
- 400
- 404
The body is the scan job status: the job ID, an overall status and description, and a status entry for each host.
The status could not be read. The body explains why.
The host has no scan job.