I am not sure how to use the
metadata command using the Python API as it is required to be the first command like
| metadata type=hosts, but when we use the Python API every search has to be appended by
In case of metadata, if I use
search metadata type=hosts or
search | metadata type=hosts, none of them are working.
Any ideas how to use it?
Try this as the search query
search index=_internal | head 1 | map maxsearches=1 "| metadata type=hosts"
It turns out that while using metadata command over API, we do not require search command as a prefix.