Project

General

Profile

Actions

Feature #19522

closed

REST call for facts

Added by Matteo Castellarin over 7 years ago. Updated over 7 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi

PuppetDB provided a nice REST feature to return a list of all facts related to the machines matching a name.
This was achieved with something like:

curl -k -i -X GET https://<<PUPPET_DB_IP>>/api/pdb/query/v4 --data-urlencode "query=inventory  { facts.project.name = 'TEST-PROJECT' }" 

In Foreman we could not get this in one step. We needed to:

  • Get a list of the machines
  • Loop over each machine to get its facts

Would it be possible to have a feature like the one of PuppetDB (i.e. one single REST call providing a list of machines matching a REGEX, each one having the list of all its facts)?

Thank you

Actions

Also available in: Atom PDF