Skip to content

Instantly share code, notes, and snippets.

@marshyski
Last active August 11, 2020 09:19
Show Gist options
  • Save marshyski/178e6e60aaf811a81fe5 to your computer and use it in GitHub Desktop.
Save marshyski/178e6e60aaf811a81fe5 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