<?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 list defined sourcetypes through API in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445564#M77525</link>
    <description>&lt;P&gt;So, I found my own answer. For anyone looking to solve this same problem in the future, I used:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkHost:8089/services/saved/sourcetypes?output_mode=json&amp;amp;count=1000"&gt;https://splunkHost:8089/services/saved/sourcetypes?output_mode=json&amp;amp;count=1000&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This gives a nice JSON parseable output of all the defined sourcetypes for a specific instance.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2019 17:40:45 GMT</pubDate>
    <dc:creator>jbanker</dc:creator>
    <dc:date>2019-08-14T17:40:45Z</dc:date>
    <item>
      <title>How to list defined sourcetypes through API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445561#M77522</link>
      <description>&lt;P&gt;I am looking for a way to list all defined sourcetypes on a Splunk server, using the REST API. &lt;/P&gt;

&lt;P&gt;From what little information I can find, it looks like it would be possible to crawl through the configuration files and look for defined sourcetypes, but I'm hoping there is an easier way.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 19:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445561#M77522</guid>
      <dc:creator>jbanker</dc:creator>
      <dc:date>2019-08-13T19:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to list defined sourcetypes through API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445562#M77523</link>
      <description>&lt;P&gt;From the search bar, try something like this as a starting point:&lt;/P&gt;

&lt;P&gt;| rest /servicesNS/-/-/configs/conf-props&lt;/P&gt;

&lt;P&gt;Note that if you are in a distributed environment, you might have to specify a splunk_server in your REST call to look at the part of the environment that your sourcetype is defined on (such as an indexer or heavy forwarder).&lt;/P&gt;

&lt;P&gt;If you want to look at it from the CLI instead, you would do something like this:&lt;/P&gt;

&lt;P&gt;curl -k -u : &lt;A href="https://splunkHost:8089/services/configs/conf-props"&gt;https://splunkHost:8089/services/configs/conf-props&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:34:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445562#M77523</guid>
      <dc:creator>traxxasbreaker</dc:creator>
      <dc:date>2019-08-13T20:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to list defined sourcetypes through API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445563#M77524</link>
      <description>&lt;P&gt;So, it looks like this can give me the sourcetypes that are currently in use by the configured inputs. Unfortunately as I stated, I'm looking to get a list of ALL configured sourcetypes available on a server. What I'm hoping to get is a list similar to what can be seen in the UI when you navigate to "Settings &amp;gt; Source types" or "&lt;A href="https://splunkHost/en-US/manager/launcher/sourcetypes"&gt;https://splunkHost/en-US/manager/launcher/sourcetypes&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 14:16:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445563#M77524</guid>
      <dc:creator>jbanker</dc:creator>
      <dc:date>2019-08-14T14:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to list defined sourcetypes through API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445564#M77525</link>
      <description>&lt;P&gt;So, I found my own answer. For anyone looking to solve this same problem in the future, I used:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkHost:8089/services/saved/sourcetypes?output_mode=json&amp;amp;count=1000"&gt;https://splunkHost:8089/services/saved/sourcetypes?output_mode=json&amp;amp;count=1000&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This gives a nice JSON parseable output of all the defined sourcetypes for a specific instance.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 17:40:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-defined-sourcetypes-through-API/m-p/445564#M77525</guid>
      <dc:creator>jbanker</dc:creator>
      <dc:date>2019-08-14T17:40:45Z</dc:date>
    </item>
  </channel>
</rss>

