Patrice, In 1.16 and newer you can add "thin=true" as a parameter to the end of the host request, which will give you a JSON with just the name and ID of each host.
On Thu, Aug 3, 2017 at 1:32 PM, Patrice Gagnon <[email protected]> wrote: > Hi guys, > > I'm brand new user of Foreman API and I'm I trying to use the api "hosts" > to get a list of all my hosts on foreman. The result show me all the > information about host and I just want the name of the host in my result. > Is it possible to return only the name field for each host? > > Thank you for your help, > Patrice > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
