Skip to main content

Get the last-scanned and staged sudoers for a Linux computer

GET 

/computers/:computerId/sudoers

Returns the sudoers last seen by a scan (lastScanSudoers) and the sudoers staged as the desired state for Protect mode (stagedSudoers).

Either is null when absent. When a staged document exists it is the one enforced once Protect is enabled; otherwise the last scanned document is used. Include files are flattened into one document. Timestamps are HTTP-date strings (Tue, 27 Oct 2026 22:03:28 GMT), not ISO 8601, and the blob has no trailing newline. createdById is null for a scan document and createdByName is absent then.

Returns 400 Can only request sudoers content for Linux systems for a non-Linux computer. Errors from the sudoers service are passed through with that service's status and a {message} body.

The server returns 500 (generic {error} body) for every caller when the staged sudoers was created by the built-in secureone account, because that account is not a directory user; stage a new sudoers with a directory user to avoid it.

Required role: superadmin or admin.

Request​

Responses​

Sudoers documents.