RabbitMQ - Delete user using the REST API (curl)

This assumes you have created a RabbitMQ user with the administrator tag.

Refer to the RabbitMQ REST API documentation.

Let's say you want to delete John Doe's user account. You will probably want to list users using the curl command before deleting a user using the curl command. In this example, John Doe's user account exists.

~]# curl --user john.doe:itsasecret http://server001:15671/api/users/john.doe
        "hashing_algorithm": "rabbit_password_hashing_sha256",
        "limits": {},
        "name": "john.doe",
        "password_hash": "cER8LDfLm++IqrqIdMgLpJ0/ADih08ZaZHx3ja+kPXjqNVxL",
        "tags": "administrator"


Here is how you would delete John Doe's user account. If the delete is successfully, no output will be returned. --write-out "%{http_code}" is included to return the http code. The return code should be 204 (success) or 405 (failed).

--request DELETE
--user admin:itsasecret
--url http://server001:15671/api/users/john.doe
--write-out "%{http_code}"


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 1086a in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |