Problem: Is there a way to get only one value as response? So it would not be required to do some grep magic in eg. a bash script.
Related to: Querying specific parameter
Foreman and Proxy versions: 1.20
Other relevant data:
|search|"fact=kernel host = 594"|
I’m not sure I understand what you are looking for? you want just the value from the response without all the matadata? or you want just the first matching result in case there is more than one?
Just the value of from the response without the metadata.
I would suggest using
jq in that case to parse the response for just the value you are interested in, e.g. someting like:
So the API always is verbose. Good to know.
Bash was just an example. So your answer above is the solution.
But it will not solve my underlying issue (which is not described here. Will open a new thread for that.)