Skip to content

Instantly share code, notes, and snippets.

@acidprime
Created February 19, 2016 00:07
Show Gist options
  • Save acidprime/5450d9eefbf3f1d0512f to your computer and use it in GitHub Desktop.
Save acidprime/5450d9eefbf3f1d0512f to your computer and use it in GitHub Desktop.
#!/opt/puppetlabs/puppet/bin/ruby
require 'net/http'
require 'json'
require 'yaml'
# Currently do not have this working with client side SSL, perhaps someone can help with that in the comments.
host = 'localhost'
port = '8080'
http = Net::HTTP.new(host, port)
resources_uri = '/pdb/query/v4/resources/User'
puts JSON.parse(http.get(resources_uri).body).to_yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment