.. _RemoveUser: RemoveUser ========== Delete a user and revoke their sessions and personal tokens. Requires ``access_control.delete`` permission. No input or output blobs are used. Parameters ---------- * ``username`` (string, required): existing user. Behavior -------- The ``admin`` user and the last user assigned the admin role cannot be removed. The telemetry account is also protected when configured. User removal and session revocation commit with the query; a failed execution rolls both back. Response -------- Success returns ``status: 0``. Failures return a negative ``status`` and an ``info`` message; see :doc:`../Responses` for error envelopes and retry guidance. Examples -------- .. TESTED_EXAMPLE: RemoveUser_1 .. code-block:: json [{ "RemoveUser": { "username": "john" } }] Response: .. TESTED_EXAMPLE: RemoveUser_1_response .. code-block:: json [{ "RemoveUser": { "status": 0 } }]