On 17/10/16 04:25, Amrit Atmajit wrote:
> Thanks Dominic,
> This search option is a proper approach to get active hosts rather than
> But adding to Vishal's query, our requirement is to list the active
> hosts along with their facts values (like, hostname, macaddress,
> manufacturer, etc.) using a single api.
Foreman doesn't have many APIs that try to combine things, you should
use multiple API calls.
> API we are using to list all hosts and their facts values is:
> We can add an external facts value to this api which will provide us
> last_report > "35 minutes ago" .
> But, we are not sure how to get this value.
These searches will only work on the hosts list, the fact_values API has
a more limited ability to search details of hosts.
Fetch the list of hosts using /api/v2/hosts, then query the facts for
each one in turn with GET /api/v2/hosts/example.com/facts.
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.