PuppetDB uses a Command/Query Responsibility Separation (CQRS) pattern:
APIs are versioned (v1, v2, v3...). The most recent ones add functionalities and try to keep backwards compatibility.
The URL for queries is structured like this:
http[s]://<server>:<port>/pdb/query/<version>/<endpoint>?query=<query>
Available endpoints for queries are: nodes
, environments
, factsets
, facts
, fact-names
, fact-paths
, fact-contents
, catalogs
, edges
, resources
, reports
, events
, event-counts
, aggregate-event-counts
, metrics
, server-time
, and version
.
Query strings are URL-encoded JSON arrays in prefix notation, which makes them look a bit unusual. The general format is as follows:
[ "<operator>" , "<field>" , "<value>" ]
The comparison operators are: =
, >=
, >
, <
, <=
and...