PuppetDB API Cheat Sheet and Useful One Liners

This is my puppetdb api cheat sheet of useful one liners for querying against the puppetdb api. These are geared for a command line environment, so youโ€™ll notice that they depend on the curl jq commands. These available through the package manager on most linux distributions.

This Itโ€™s a work in progress.

Generate a host list from the puppetdb api.

$ curl -s 'http://localhost:8080/v3/nodes' | jq -r '.[].name'

PuppetDB API documentation: http://docs.puppetlabs.com/puppetdb/latest/api/โ€

jq documentation: http://stedolan.github.io/jq/manual/