Created
March 31, 2016 16:54
-
-
Save photomattmills/ac881df5a06255e08102f7339919e702 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'typhoeus' | |
require 'json' | |
require 'uri' | |
domain = 'https://silver-jellyfish.rmq.cloudamqp.com/' | |
#get your username and password and put them here | |
userpass = "user:pass" | |
connections_req = Typhoeus::Request.get("#{domain}api/connections", userpwd: userpass ) | |
connections = JSON.parse(connections_req.body) | |
names = connections.map{|c| c["name"] } | |
names.each do |name| | |
Typhoeus::Request.delete("#{domain}api/connections/#{URI::encode name}", userpwd: userpass) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment