• General information
  • Installation
  • Configuration
  • Usage/admin
  • Troubleshooting
  • PQL - Puppet Query Language
  • API
  • Query API version 4
  • Extensions API version 1 (PE-only)
  • Admin API version 1
  • Command API version 1
  • Status API version 1
  • Metadata API version 1
  • Metrics API version 1
  • Wire formats

API overview

Sections

Because PuppetDB collects lots of data from Puppet, it’s an ideal platform for new tools and applications that use that data. You can use the HTTP API described in these pages to interact with PuppetDB’s data.

Summary

PuppetDB’s API uses a Command/Query Responsibility Separation (CQRS) pattern. This means:

  • Data can be queried using a standard REST-style API. Queries are processed immediately.
  • When making changes to data (facts, catalogs, etc.), you must send an explicit command (as opposed to submitting data without comment and letting the receiver determine intent). Commands are processed asynchronously in FIFO order.

The PuppetDB API consists of the following parts:

Queries

PuppetDB’s data can be queried with a REST API.

The available query endpoints are documented in the pages linked below.

Query endpoints

Version 4

This is the current stable API.

Version 3 (Retired)

Version 3 of the query API has been retired. Please use v4.

Version 2 (Retired)

Version 2 of the query API has been retired. Please use v4.

Commands

Commands are sent via HTTP but do not use a REST-style interface.

PuppetDB supports a relatively small number of commands. The command submission interface and all available commands are described at the commands page.

Unlike the query API, these commands are generally only useful to Puppet itself, and all format conversion and command submission is handled by the PuppetDB-termini on your Puppet Server.

The “replace” commands all require data in one of the wire formats described below.

Wire formats

All of PuppetDB’s “replace” commands contain payload data, which must be in one of the following formats. These formats are also linked from the commands that use them.

Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.