Hi Harish, > There is no direct API to get all the reports for a specific host. To get > this, i'm trying to use search filter like > https://puppetmaster/api/reports?search="host_name=Myhostname" with no > results.
The key for filtering by host is 'host', not 'host_name'. You will want to ensure that you URL encode your query as well. > Also, please tell me, how to use sort by in Foreman API's. The parameter you want is "order" (http://www.katello.org/docs/3.1/api/apidoc/reports/index.html). You can see what options are available by logging into your Foreman instance, opening a host and clicking on "Reports". Once in there hover over the column headers to see the different options. For example, to order by "Last report" you would say: ?order=reported+ASC&search=host+%3D+my.host.name (note the search parameter is URL encoded) Regards, j -- 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.
