Skip to Main Content
Extending Puppet
book

Extending Puppet

by Alessandro Franceschi
June 2014
Intermediate to advanced content levelIntermediate to advanced
328 pages
7h 26m
English
Packt Publishing
Content preview from Extending Puppet

The PuppetDB API

PuppetDB uses a Command/Query Responsibility Separation (CQRS) pattern:

  • Read: These activities are done for queries on the available REST-like endpoints
  • Write: These commands update catalog, facts, and reports and deactivate nodes

APIs are versioned (v1, v2, v3, and so on), and the most recent ones add functionalities and try to keep backward compatibility.

Querying PuppetDB (Read)

The URL for queries is structured as follows:

http[s]://<server>:<port>/<version>/<endpoint>?query=<query>

The available endpoints for queries are metrics, fact-names, facts, nodes, resources, reports, events, event-counts, aggregate-event-counts, and server-time.

Query strings are URL-encoded JSON arrays in prefix notation, which makes them look a bit unusual. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Puppet

Mastering Puppet

Thomas Uphill
Learning Puppet

Learning Puppet

Chad Thompson
Pro Puppet

Pro Puppet

James Turnbull, Jeffrey McCune

Publisher Resources

ISBN: 9781783981441Supplemental Content