Update a user's Linux configuration
PATCH/users/:userId
Merges the supplied linux_config into the user's stored Linux account properties (the
UID, GID, home directory and default shell used when the account is created on a Linux
system). Only linux_config can be changed with this endpoint. Properties not supplied
keep their current values. The body may be JSON or form-encoded.
Required role: admin or superadmin.
Only the linux_config fields you send are changed; fields you leave out keep their stored values (a partial update, not a replacement). An empty linux_config object succeeds and changes nothing. With a form-encoded body, send the fields with bracket names (linux_config[uid]=20003&linux_config[home_dir]=/home/y); a single flat linux_config form field is accepted with 200 but does nothing. A value that cannot be stored (for example a non-numeric uid) returns 400 ValidationError. A non-object linux_config such as a string returns 200 and changes nothing. Other body fields (for example access) are ignored. Unknown userId returns the plain-text 404 Invalid User ID.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 422
Updated.
A linux_config value could not be stored (for example uid is not a number). Typed error body with name ValidationError. A malformed JSON body returns 400 with the generic body {"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.
The body has no linux_config ("Missing linux config"). Typed error body.