<?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: Create REST API in app Namespace? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Create-REST-API-in-app-Namespace/m-p/632732#M10956</link>
    <description>&lt;P&gt;It is generally not good practice to keep development and production on the same instance.&lt;/P&gt;&lt;P&gt;You should consider some sort of build and delivery pipeline for deploying your code from development to production to "keep the code the same".&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 08:51:43 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-03-01T08:51:43Z</dc:date>
    <item>
      <title>Create REST API in app Namespace?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-REST-API-in-app-Namespace/m-p/632699#M10955</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am creating REST API'S for fetching data from an external server. I was able to successfully create the API.&lt;/P&gt;
&lt;P&gt;Question/Problem:&lt;/P&gt;
&lt;P&gt;I have two apps on the same Splunk instance&lt;/P&gt;
&lt;P&gt;1) Development&lt;/P&gt;
&lt;P&gt;2) Production&lt;/P&gt;
&lt;P&gt;Both of them have a similar code for the REST API's.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in restmap.conf&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[script:build]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;match=/build&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;script=build.py&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;scripttype=persist&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;handler=application.build&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When I call the REST API from either Development or Production application the call is being made to the API in Development application.&lt;/P&gt;
&lt;P&gt;I have tried using serviceNS/&amp;lt;app_name&amp;gt;/&amp;lt;user_name&amp;gt;/&amp;lt;rest_endpoint&amp;gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the calling is still being made to the API under Development.&lt;/P&gt;
&lt;P&gt;How can I create the REST API in a such a way that it belongs to the APPs namespace.&lt;/P&gt;
&lt;P&gt;P.S.&lt;/P&gt;
&lt;P&gt;I need to keep the code same for both Production and Development application.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 03:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-REST-API-in-app-Namespace/m-p/632699#M10955</guid>
      <dc:creator>Kronecker</dc:creator>
      <dc:date>2023-03-01T03:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create REST API in app Namespace?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-REST-API-in-app-Namespace/m-p/632732#M10956</link>
      <description>&lt;P&gt;It is generally not good practice to keep development and production on the same instance.&lt;/P&gt;&lt;P&gt;You should consider some sort of build and delivery pipeline for deploying your code from development to production to "keep the code the same".&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 08:51:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-REST-API-in-app-Namespace/m-p/632732#M10956</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-01T08:51:43Z</dc:date>
    </item>
  </channel>
</rss>

