<?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 Regular expression in restmap.conf in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Regular-expression-in-restmap-conf/m-p/531616#M9554</link>
    <description>&lt;P&gt;So I'd like to have one custom rest handler that allows for URLs like&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;/myapp/files&lt;/LI&gt;
&lt;LI&gt;/myapp/files/0&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;restmap.conf&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;[script:myapp_files]
match=/myapp/files*
python.version=python3
handler=myapp_files.req
methods=GET,POST,PUT,DELETE
script = myapp_files.py
scripttype = persist&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;web.conf&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;[expose:myapp_files]
pattern=myapp/files*
methods=GET,POST,PUT,DELETE&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/Admin/Restmapconf#restmap.conf.example" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/Admin/Restmapconf#restmap.conf.example&lt;/A&gt;&amp;nbsp;doesn't appear to say anything about "match" being a regular expression.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 02 Dec 2020 04:05:30 GMT</pubDate>
    <dc:creator>tmontney</dc:creator>
    <dc:date>2020-12-02T04:05:30Z</dc:date>
    <item>
      <title>Regular expression in restmap.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regular-expression-in-restmap-conf/m-p/531616#M9554</link>
      <description>&lt;P&gt;So I'd like to have one custom rest handler that allows for URLs like&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;/myapp/files&lt;/LI&gt;
&lt;LI&gt;/myapp/files/0&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;restmap.conf&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;[script:myapp_files]
match=/myapp/files*
python.version=python3
handler=myapp_files.req
methods=GET,POST,PUT,DELETE
script = myapp_files.py
scripttype = persist&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;web.conf&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;[expose:myapp_files]
pattern=myapp/files*
methods=GET,POST,PUT,DELETE&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/Admin/Restmapconf#restmap.conf.example" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/Admin/Restmapconf#restmap.conf.example&lt;/A&gt;&amp;nbsp;doesn't appear to say anything about "match" being a regular expression.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Dec 2020 04:05:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regular-expression-in-restmap-conf/m-p/531616#M9554</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2020-12-02T04:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression in restmap.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regular-expression-in-restmap-conf/m-p/531712#M9555</link>
      <description>&lt;P&gt;I would presume that if the docs don't say a regex is allowed then a regex is not allowed.&lt;/P&gt;&lt;P&gt;There are examples, however, of pattern use in the OOTB restmap.conf files.&amp;nbsp; See&amp;nbsp;splunk_instrumentation/default/restmap.conf for an example.&amp;nbsp; In your case adding a slash may help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;match=/myapp/files/*&lt;/LI-CODE&gt;&lt;P&gt;If it works then submit feedback on that documentation page to ask them to say patterns are allowed.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 14:20:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regular-expression-in-restmap-conf/m-p/531712#M9555</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-02T14:20:24Z</dc:date>
    </item>
  </channel>
</rss>

