RabbitMQ - List users using the REST API (curl)

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

Refer to the RabbitMQ REST API documentation.

The curl command with the --user option can be used to make an API connection to RabbitMQ. In this example, every user will be returned.

curl --user john.doe:itsasecret http://server001:15671/api/users

 

Something like this should be returned.

[
    {
        "hashing_algorithm": "rabbit_password_hashing_sha256",
        "limits": {},
        "name": "john.doe",
        "password_hash": "cER8LDfLm++IqrqIdMgLpJ0/ADih08ZaZHx3ja+kPXjqNVxL",
        "tags": "administrator"
    },
    {
        "hashing_algorithm": "rabbit_password_hashing_sha256",
        "limits": {},
        "name": "jane.doe",
        "password_hash": "iBe4IDLdPbMi5cq+vbQWj+TZecchj42u7rjWwqGT0tIMpwQa",
        "tags": "management"
    }
]

 

Here is how to list an individual user.

curl --user john.doe:itsasecret http://server001:15671/api/users/john.doe

 

Which should return something like this.

[
    {
        "hashing_algorithm": "rabbit_password_hashing_sha256",
        "limits": {},
        "name": "john.doe",
        "password_hash": "cER8LDfLm++IqrqIdMgLpJ0/ADih08ZaZHx3ja+kPXjqNVxL",
        "tags": "administrator"
    }
]

 




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 68087 in the box below so that we can be sure you are a human.




Comments

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