Hello,
I have a fresh installation of foreman 1.2 (installed via provided puppet
scripts). I have just added some hosts and now I wish to develop something
to query the facts of these hosts externally (via the api).
I am currently testing with curl, however the 'facts' call doesn't return
all of the facts for my hosts. I am using the following;
curl -u api_user:api_user -H 'Accept:application/json,version=2'
http://foreman/api/hosts/client.fqdn/facts
The output of this command is ('sensitive' information has been removed);
{"client.fqdn":{"macaddress_eth0":"","macaddress":"","bios_release_date":"07/09/2012","augeasversion":"0.9.0","processorcount":"1","physicalprocessorcount":"1","blockdevice_sr0_size":"1073741312","network_lo":"127.0.0.0","ipaddress_lo":"127.0.0.1","network_eth0":"","ipaddress_eth0":"","ipaddress":"","mtu_eth0":"1500","mtu_lo":"16436","facterversion":"1.7.2","rubyversion":"1.8.7","uptime_days":"2","ipaddress6_eth0":"","ipaddress6":"","blockdevice_sda_size":"21474836480"}}
However, if I browse to the host in the foreman UI (as 'api_user') I see
around 100 facts for this host.
I don't understand why I only see a subset of the hosts from the api?
The 'api_user' has 'Viewer' permissions assigned.
Can anyone shed any light on what I am experiencing?
Any hints are much appreciated!
Cheers,
Ben