<?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 Can the .spec be retrieved via REST in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Can-the-spec-be-retrieved-via-REST/m-p/551768#M9866</link>
    <description>&lt;P&gt;Similar to fetching config by namespace via &lt;A title="REST - Configuration Endpoints" href="https://docs.splunk.com/Documentation/Splunk/8.1.3/RESTREF/RESTconf" target="_self"&gt;REST - Configuration Endpoints&lt;/A&gt;, is there a way to access the .spec defined for different config files via REST API?&lt;BR /&gt;&lt;BR /&gt;Edit: spelling.&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 01:56:13 GMT</pubDate>
    <dc:creator>abramble</dc:creator>
    <dc:date>2021-05-17T01:56:13Z</dc:date>
    <item>
      <title>Can the .spec be retrieved via REST</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Can-the-spec-be-retrieved-via-REST/m-p/551768#M9866</link>
      <description>&lt;P&gt;Similar to fetching config by namespace via &lt;A title="REST - Configuration Endpoints" href="https://docs.splunk.com/Documentation/Splunk/8.1.3/RESTREF/RESTconf" target="_self"&gt;REST - Configuration Endpoints&lt;/A&gt;, is there a way to access the .spec defined for different config files via REST API?&lt;BR /&gt;&lt;BR /&gt;Edit: spelling.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 01:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Can-the-spec-be-retrieved-via-REST/m-p/551768#M9866</guid>
      <dc:creator>abramble</dc:creator>
      <dc:date>2021-05-17T01:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can the .spec be retrieved via REST</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Can-the-spec-be-retrieved-via-REST/m-p/554992#M9867</link>
      <description>&lt;P&gt;Answering my own question. After digging around I discovered in the default restmap.conf a reference to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[spec:spec]
match=/configs/spec&lt;/LI-CODE&gt;&lt;P&gt;What appears to be merged spec from all apps is available, however I cannot find any documentation of the input params. "filename" and "stanza" I was able to guess.&lt;BR /&gt;&lt;BR /&gt;/services/config/spec?filename=alert_actions&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "filename": "alert_actions",
  "stanzas": [
    {
      "stanza": "default",
      "rawStanza": "default"
    },
    {
      "stanza": "email",
      "rawStanza": "email"
    },
    {
      "stanza": "logevent",
      "rawStanza": "logevent"
    },
    {
      "stanza": "lookup",
      "rawStanza": "lookup"
    },
    {
      "stanza": "outputtelemetry",
      "rawStanza": "outputtelemetry"
    },
    {
      "stanza": "populate_lookup",
      "rawStanza": "populate_lookup"
    },
    {
      "stanza": "rss",
      "rawStanza": "rss"
    },
    {
      "stanza": "script",
      "rawStanza": "script"
    },
    {
      "stanza": "summary_index",
      "rawStanza": "summary_index"
    },
    {
      "stanza": "webhook",
      "rawStanza": "webhook"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and deeper inspection by passing the 'stanza' parameter&lt;BR /&gt;&lt;BR /&gt;/services/configs/spec?filename=alert_actions&amp;amp;stanza=email&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "filename": "alert_actions",
  "stanza": "email",
  "settings": [
    {
      "name": "alert.execute.cmd",
      "placeholder": "&amp;lt;string&amp;gt;"
    },
    {
      "name": "alert.execute.cmd.arg.&amp;lt;n&amp;gt;",
      "placeholder": "&amp;lt;string&amp;gt;"
    },
    {
      "name": "auth_password",
      "placeholder": "&amp;lt;password&amp;gt;"
    }
  ]
  ... elided
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 02:11:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Can-the-spec-be-retrieved-via-REST/m-p/554992#M9867</guid>
      <dc:creator>abramble</dc:creator>
      <dc:date>2021-06-09T02:11:02Z</dc:date>
    </item>
  </channel>
</rss>

