RabbitMQ - List user permissions using the REST API
by
Jeremy Canfield |
Updated: December 29 2022
| 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 permission for every user will be returned.
curl --user john.doe:itsasecret http://server001:15671/api/permissions
Something like this should be returned.
[
{"user":"john.doe","vhost":"vhost001","configure":".*","write":".*","read":".*"},
{"user":"jane.doe","vhost":"vhost002","configure":".*","write":".*","read":".*"}
]
Here is how to list an individual users permissions.
curl --user john.doe:itsasecret http://server001:15671/api/user/john.doe/permissions
Which should return something like this.
[
{"user":"john.doe","vhost":"vhost001","configure":".*","write":".*","read":".*"}
]
Did you find this article helpful?
If so, consider buying me a coffee over at