Article 5H379 [SOLVED] How to get list of all items from curl parameters

[SOLVED] How to get list of all items from curl parameters

by
witchkinkofangmar
from LinuxQuestions.org on (#5H379)
I have a script using the host_find method request and I just want it to return a list of all fqdns, nothing else. Currently, it returns every parameter for every host.

Current:
Code:{"result": {"result": [{"fqdn": ["hostname.org.com"], "krbprincipalname": ["host/hostname.org.com@ORG.COM"], "krbcanonicalname": ["host/hostname.org.com@ORG.COM"], "sshpubkeyfp": ["SHA256:IMP+uhytndtayi2WZOItv9897Pl/y68kiB6P2H5W+A (ecdsa-sha2-nistp256)", ........
.......
.......
.......Needed:
Code:{"result": {"result": [{"fqdn": ["hostname.org.com"] or just Code:hostname.org.comMethod Request:
Code:# Send host_find method request
curl -k -v \
-H referer:https://$IPAHOSTNAME/ipa \
-H "Content-Type:application/json" \
-H "Accept:applicaton/json"\
-c $COOKIEJAR -b $COOKIEJAR \
--cacert /etc/ipa/ca.crt \
-d '{"method":"host_find","params":[[""],{}],"id":0}' \
-X POST \
https://$IPAHOSTNAME/ipa/session/jsonlatest?d=yIl2AUoC8zA latest?i=9d2c9_XiCm4:SAhRVOo7TJ8:F7zBnMy latest?i=9d2c9_XiCm4:SAhRVOo7TJ8:V_sGLiP latest?d=qj6IDK7rITs latest?i=9d2c9_XiCm4:SAhRVOo7TJ8:gIN9vFw9d2c9_XiCm4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments