Bootstrap FreeKB - RabbitMQ - Grant user permissions using the REST API
RabbitMQ - Grant user permissions 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, John Doe is granted full access to virtual host vhost001. If the virtual host is / (just the forward slash), you will need to use %2F instead of /.

curl
--user john.doe:itsasecret
--header "content-type:application/json"
--request PUT
--data '{"configure":".*","write":".*","read":".*"}'
--write-out "%{http_code}"
--url http://server001:15671/api/permissions/vhost001/john.doe

 

If the request is successful, HTTP response code 204 should be returned.

204

 




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