<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to search with the metadata command using the Python API? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243386#M72436</link>
    <description>&lt;P&gt;It turns out that while using  metadata command over API, we do not require search command as a prefix.&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2016 09:00:59 GMT</pubDate>
    <dc:creator>lohitkidu</dc:creator>
    <dc:date>2016-05-25T09:00:59Z</dc:date>
    <item>
      <title>How to search with the metadata command using the Python API?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243383#M72433</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;I am not sure how to use the &lt;CODE&gt;metadata&lt;/CODE&gt; command using the Python API as it is required to be the first command like &lt;CODE&gt;| metadata type=hosts&lt;/CODE&gt;, but when we use the Python API every search has to be appended by &lt;CODE&gt;search&lt;/CODE&gt; like &lt;CODE&gt;search index=abc&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;In case of metadata, if I use &lt;CODE&gt;search metadata type=hosts&lt;/CODE&gt; or &lt;CODE&gt;search | metadata type=hosts&lt;/CODE&gt;, none of them are working. &lt;/P&gt;

&lt;P&gt;Any ideas how to use it?&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 05:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243383#M72433</guid>
      <dc:creator>lohitkidu</dc:creator>
      <dc:date>2016-05-12T05:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to search with the metadata command using the Python API?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243384#M72434</link>
      <description>&lt;P&gt;Try this as the search query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search index=_internal | head 1 | map maxsearches=1 "| metadata type=hosts"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 May 2016 06:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243384#M72434</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-12T06:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to search with the metadata command using the Python API?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243385#M72435</link>
      <description>&lt;P&gt;Never worked for me.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 08:41:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243385#M72435</guid>
      <dc:creator>lohitkidu</dc:creator>
      <dc:date>2016-05-25T08:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to search with the metadata command using the Python API?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243386#M72436</link>
      <description>&lt;P&gt;It turns out that while using  metadata command over API, we do not require search command as a prefix.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 09:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-with-the-metadata-command-using-the-Python-API/m-p/243386#M72436</guid>
      <dc:creator>lohitkidu</dc:creator>
      <dc:date>2016-05-25T09:00:59Z</dc:date>
    </item>
  </channel>
</rss>

