Skip to content

Instantly share code, notes, and snippets.

@powellnathanj
Forked from marshyski/puppetdb-curl.sh
Created August 12, 2016 14:45
Show Gist options
  • Save powellnathanj/a221d22710a35e3d50281b70f830b0d9 to your computer and use it in GitHub Desktop.
Save powellnathanj/a221d22710a35e3d50281b70f830b0d9 to your computer and use it in GitHub Desktop.
Puppet DB Curl Examples
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]'
curl -sf 'http://localhost:8080/v3/facts'
curl -sf 'http://localhost:8080/v3/nodes'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kerneldate"], "25Feb2015"]'
curl -sf 'http://localhost:8080/v3/nodes/master.inf.puppetlabs.demo/facts'
curl -sf 'http://localhost:8080/v3/nodes/master.inf.puppetlabs.demo/facts/kerneldate'
curl -sf 'http://localhost:8080/v3/facts' | grep -A1 -B1 kerneldate | grep -v '\--'
curl -sf -X GET 'http://localhost:8080/v3/resources/User'
curl -sf -X GET 'http://localhost:8080/v3/fact-names'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment