Bootstrap FreeKB - RabbitMQ - List users using the REST API
RabbitMQ - List users using the REST API

Updated:   |  RabbitMQ articles

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



Comments


Add a Comment


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