Foreman facts api does not give complete results

Hi,

I'm trying to retrieve facts from Foreman API and it does not provide all
the facts. My puppet agent facts.yaml file contains all the facts and shows
in puppet master via mco commands.

Do i need to enable puppeDB for this?

/api/hosts/10/facts

Thanks

>
> Hi,
>
> I'm trying to retrieve facts from Foreman API and it does not provide all
the facts. My puppet agent facts.yaml file contains all the facts and shows
in puppet master via mco commands.
>
> Do i need to enable puppeDB for this?
>
>
> /api/hosts/10/facts
>

It's paginate by default, try adding a per_page=9999 (or similar value)
parameter to get more results.

Ohad
>
>
> Thanks
>
>
> –
> 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 foreman-users+unsubscribe@googlegroups.com.

··· On May 17, 2016 06:10, "Harish Kothuri" wrote: > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.
1 Like

Got it. Thanks !

The key is to know how to construct API URL's which are not part of API doc.

https://puppetmaster/api/fact_values?per_page=999

··· On Tuesday, May 17, 2016 at 11:41:43 AM UTC+5:30, ohad wrote: > > > On May 17, 2016 06:10, "Harish Kothuri" <harish...@gmail.com > > wrote: > > > > Hi, > > > > I'm trying to retrieve facts from Foreman API and it does not provide > all the facts. My puppet agent facts.yaml file contains all the facts and > shows in puppet master via mco commands. > > > > Do i need to enable puppeDB for this? > > > > > > /api/hosts/10/facts > > > > It's paginate by default, try adding a per_page=9999 (or similar value) > parameter to get more results. > > Ohad > > > > > > Thanks > > > > > > -- > > 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 foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at https://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. >