List All Parameters for a host

api

#1

is there a way to list all parameters from a host using foreman-api. I tried using yaml but it gives me the parameters including all other attributes from all the tab sections.

https://foreman.example.com/node/?format=yml

Above one will list all the parameters in the parameter array


#2

Maybe I’m misunderstanding, but

Foreman.example.com/api/v2/hosts/host.fqdn/parameters

Should do it?


#3

Foreman.example.com/api/v2/hosts/host.fqdn/parameters

I tried like,
https://foreman.example.com/api/v2/hosts/testhost.qa.service.com/parameters

Above will list only overriden parameters. Not all the parameters from the parameters tab.


#4

Lang_Jason,

I am waiting for your reply. Let me know If you need more information.

Santhosh


#5

Parsing he ENC is probably the easiest, even though it contains some other internally calculated values (which may be useful in themselves):
https://theforeman.org/api/1.21/apidoc/v2/hosts/enc.html