Set the persistent flag of an inventory administrator
PATCH/computers/:computerId/admins
Marks an inventory administrator as persistent (always a local administrator, never removed after a session) or not.
Identify the account with sid, or with id (user, group, or computer object id). When both are sent, sid wins. persistent is required and must be a boolean (or the string true or false when urlencoded); any other value, a missing persistent, or neither sid nor id, is 422 Missing required parameters. A malformed id is 422 Invalid User ID: "<value>"; an unknown one 422 Invalid Admin ID.
Returns 409 Administrator not in inventory if the account is not in the inventory, and 422 if persistence is not allowed (Linux with
Netwrix directory bridging and a domain account: a message that a domain account on a Netwrix-bridged computer cannot be persistent).
Required role: superadmin or admin.
Request
Responses
- 200
- 401
- 403
- 404
- 409
- 422
Administrator updated.
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 request conflicts with the current state of the resource.
The request could not be processed, for example an id that is not a valid object id.