Get the sudoers entries that apply to one inventory administrator
GET/computers/:computerId/sudoers/admin/:adminSid
Returns the sudoers entries that grant the account privileges, including entries reached through user
lists, user aliases, and domain groups the account belongs to. Local group membership is not included. Accounts are addressed by their inventory SID, which for local Linux accounts looks like uid:1001.
If the sudoers service rejects the request (for example, the computer is not Linux, the account is not a user or group, the SID is not in the inventory, or no sudoers exists), the server does not report it: the response is 200 with an empty body and no Content-Type. Only GET is routed.
Required role: superadmin or admin.
Request
Responses
- 200
- 401
- 403
- 404
Privileges for the account, or an empty body when the sudoers service returned an error.
No token, or the token is invalid or expired. The body is {message}: No auth token provided when no token is sent, otherwise the token check's message (jwt expired, jwt malformed, invalid signature, invalid token, jwt signature is required). Send Authorization: Bearer <token> exactly: the server drops the first seven characters of the header and reads the rest as the token, so a different scheme or an extra space fails. If Authorization is absent, the server reads a token field in the body, then a token query parameter, then x-access-token. Routes that validate query fields reject ?token= with 400 InvalidQuery.
The token's role is not allowed for this operation, or the token's scopes exclude the route
(Scope not allowed by token).
No record has the :id in the path (the id is malformed or unknown). The body is the bare text Invalid <Type> ID (for example Invalid Computer ID, Invalid User ID) with Content-Type text/html; charset=utf-8, not JSON. Some routes return an empty body.