<?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 get the sourcetype in an index  and its types like int, string or char etc  by api in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649784#M224660</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225834"&gt;@kitkit321&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You could try something like this (if you are connected on your Search Head, otherwise you'll need to replace &lt;A href="https://localhost" target="_blank"&gt;https://localhost&lt;/A&gt; with the url of the Search Head you want to target).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -u admin:"&amp;lt;your_password&amp;gt;" https://localhost:8089/services/search/jobs -d search="| metadata type=sourcetypes index=&amp;lt;your_index&amp;gt; | table sourcetype"

curl -k -u admin:"&amp;lt;your_password&amp;gt;" https://localhost:8089/services/services/search/jobs/&amp;lt;sid_returned_on_previous_command&amp;gt;/results&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps !&lt;/P&gt;&lt;P&gt;GaetanVP&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2023 07:27:58 GMT</pubDate>
    <dc:creator>GaetanVP</dc:creator>
    <dc:date>2023-07-10T07:27:58Z</dc:date>
    <item>
      <title>How to get the sourcetype in an index  and its types like int, string or char etc  by api?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649567#M224590</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I am new to API.&lt;BR /&gt;I want to use api to get all the sourcetype and its type in the index.&lt;BR /&gt;what should I do ?&lt;BR /&gt;&lt;BR /&gt;Many Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 12:51:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649567#M224590</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2023-07-10T12:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the sourcetype in an index  and its types like int, string or char etc  by api</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649751#M224649</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225834"&gt;@kitkit321&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Use the metadata command to get the details.&lt;BR /&gt;&lt;BR /&gt;|metadata type=sourcetypes index=my_index&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jul 2023 13:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649751#M224649</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2023-07-09T13:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the sourcetype in an index  and its types like int, string or char etc  by api</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649778#M224658</link>
      <description>&lt;P&gt;How can i use the api to do it?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 06:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649778#M224658</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2023-07-10T06:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the sourcetype in an index  and its types like int, string or char etc  by api</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649784#M224660</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225834"&gt;@kitkit321&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You could try something like this (if you are connected on your Search Head, otherwise you'll need to replace &lt;A href="https://localhost" target="_blank"&gt;https://localhost&lt;/A&gt; with the url of the Search Head you want to target).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -u admin:"&amp;lt;your_password&amp;gt;" https://localhost:8089/services/search/jobs -d search="| metadata type=sourcetypes index=&amp;lt;your_index&amp;gt; | table sourcetype"

curl -k -u admin:"&amp;lt;your_password&amp;gt;" https://localhost:8089/services/services/search/jobs/&amp;lt;sid_returned_on_previous_command&amp;gt;/results&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps !&lt;/P&gt;&lt;P&gt;GaetanVP&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 07:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-sourcetype-in-an-index-and-its-types-like-int/m-p/649784#M224660</guid>
      <dc:creator>GaetanVP</dc:creator>
      <dc:date>2023-07-10T07:27:58Z</dc:date>
    </item>
  </channel>
</rss>

