by Sigurd Teigen - February 20, 2012
One feature our customers have requested for the next version of CFEngine Nova (available before summer 2012) is having the ability to collect reported data through a REST API. It is already possible to get at reporting data through the Mission Portal web-interface, as well as the command-line client cf-report. However, as we want to provide our customers with greater flexibility, we are now introducing the addition of REST (HTTP) as another interface.
REST-based APIs are convenient for a number of reasons. First, they are commonplace in the industry and many people already know how they work. Secondly, they may integrate more easily with other tools that can call HTTP interfaces.
In our first release of the REST API, we provide most of the reporting data available in the Mission Portal in read-only mode. Included are:
The API is versioned so that it may be extended or changed in the future based on customer feedback. It currently supports JSON as its message format.
To get an idea of what you might use the REST API for, suppose you wanted transfer information about promises not kept from Nova into some third-party reporting system. You could use an ETL tool like Pentaho Kettle to automate this process. Let's set up a simple transformation pipeline. No coding required!

While this example is simple, it is possible to use Pentaho Kettle to combine several results from the REST API to make custom reports, as well as converting the data to different formats and write the output to multiple places.
We hope that you will find the REST API a useful addition to Nova and that it will provide a another avenue for integrating CFEngine with your existing infrastructure. Let us know how we can improve!