<?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 Python end point configured in web.conf is not working in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178803#M2385</link>
    <description>&lt;P&gt;I am just trying to make a python method to respond for a http request (Interact with python using javascript).&lt;BR /&gt;
      I got an url from splunk wiki&lt;BR /&gt;
The configuration given in that url is&lt;BR /&gt;
 1. Create an app with my python module inside &lt;STRONG&gt;controllers&lt;/STRONG&gt; folder&lt;BR /&gt;
 2. In web.conf create a endpoint as [endpoint:&lt;PYTHON_MODULE_NAME&gt;]&lt;BR /&gt;
 3. just restart. The method inside the puython module can be accessed through the url &lt;BR /&gt;
    ./custom/&lt;APPNAME&gt;/&lt;MODULE_NAME&gt;/&lt;METHOD_NAME&gt;&lt;BR /&gt;
 4. Restart and login again&lt;/METHOD_NAME&gt;&lt;/MODULE_NAME&gt;&lt;/APPNAME&gt;&lt;/PYTHON_MODULE_NAME&gt;&lt;/P&gt;

&lt;P&gt;But, even after doing the above configuration URL of the above pattern is not available.&lt;BR /&gt;
Anyone Please share your knoledge related to this.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Aug 2014 05:22:13 GMT</pubDate>
    <dc:creator>paramagurukarth</dc:creator>
    <dc:date>2014-08-12T05:22:13Z</dc:date>
    <item>
      <title>Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178803#M2385</link>
      <description>&lt;P&gt;I am just trying to make a python method to respond for a http request (Interact with python using javascript).&lt;BR /&gt;
      I got an url from splunk wiki&lt;BR /&gt;
The configuration given in that url is&lt;BR /&gt;
 1. Create an app with my python module inside &lt;STRONG&gt;controllers&lt;/STRONG&gt; folder&lt;BR /&gt;
 2. In web.conf create a endpoint as [endpoint:&lt;PYTHON_MODULE_NAME&gt;]&lt;BR /&gt;
 3. just restart. The method inside the puython module can be accessed through the url &lt;BR /&gt;
    ./custom/&lt;APPNAME&gt;/&lt;MODULE_NAME&gt;/&lt;METHOD_NAME&gt;&lt;BR /&gt;
 4. Restart and login again&lt;/METHOD_NAME&gt;&lt;/MODULE_NAME&gt;&lt;/APPNAME&gt;&lt;/PYTHON_MODULE_NAME&gt;&lt;/P&gt;

&lt;P&gt;But, even after doing the above configuration URL of the above pattern is not available.&lt;BR /&gt;
Anyone Please share your knoledge related to this.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 05:22:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178803#M2385</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2014-08-12T05:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178804#M2386</link>
      <description>&lt;P&gt;Sorry.. Same set up works for me...&lt;BR /&gt;
Previously I just configured the web.conf in $Splunk_Home$/etc/system/local..&lt;BR /&gt;
Now I did the same configuration inside $Splunk_Home$/etc/apps//default. It works and my python function is working as a listener for a http request (http:/ip:/custom///)&lt;/P&gt;

&lt;P&gt;web.conf :&lt;BR /&gt;
[endpoint:netutils]    #Name of the python file&lt;/P&gt;

&lt;P&gt;netutils.py&lt;BR /&gt;
import cherrypy&lt;BR /&gt;
import splunk.appserver.mrsparkle.controllers as controllers&lt;BR /&gt;
from splunk.appserver.mrsparkle.lib.decorators import expose_page&lt;BR /&gt;
from splunk.appserver.mrsparkle.lib.routes import route&lt;/P&gt;

&lt;P&gt;class MyControllerController(controllers.BaseController):&lt;BR /&gt;
    @expose_page(must_login=True)&lt;BR /&gt;
    def listenerGet(self, **kwargs):&lt;BR /&gt;
        cherrypy.response.headers['Content-Type'] = 'text/plain'&lt;BR /&gt;
        return 'I am responding for your request'&lt;/P&gt;

&lt;P&gt;Please refer &lt;A href="http://wiki.splunk.com/Community:40GUIDevelopment" target="_blank"&gt;http://wiki.splunk.com/Community:40GUIDevelopment&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:19:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178804#M2386</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2020-09-28T17:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178805#M2387</link>
      <description>&lt;P&gt;Hi  paramagurukarthikeyan, Thanks for posting this. I am also looking similar one like this. &lt;BR /&gt;
couple of clarifications. &lt;/P&gt;

&lt;P&gt;1, How you called "MyPython.py" in your HTML view page?&lt;BR /&gt;
2. You mentioned endpoint as "netutils", But where are you using this?, I am not seeing this in .py file.&lt;/P&gt;

&lt;P&gt;Thanks for your time.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 06:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178805#M2387</guid>
      <dc:creator>kasu_praveen</dc:creator>
      <dc:date>2016-05-06T06:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178806#M2388</link>
      <description>&lt;P&gt;Got answers for my above questions in another thread &lt;A href="https://answers.splunk.com/answers/352862/how-to-call-a-python-script-from-an-html-view.html"&gt;link text&lt;/A&gt;. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 08:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178806#M2388</guid>
      <dc:creator>kasu_praveen</dc:creator>
      <dc:date>2016-05-09T08:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178807#M2389</link>
      <description>&lt;P&gt;Sorry, I couldn't help you.. I just saw &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 09:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178807#M2389</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2017-04-25T09:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178808#M2390</link>
      <description>&lt;P&gt;I can't get this to work. Is it not supported in 6.4.x and above?&lt;BR /&gt;
The documentation you've linked to in another answer is of Splunk 4.x&lt;BR /&gt;
I always get a error 404, even when I tried to run your exact code. Anyway I can fix this?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 18:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178808#M2390</guid>
      <dc:creator>amritanshgupta</dc:creator>
      <dc:date>2017-08-03T18:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python end point configured in web.conf is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178809#M2391</link>
      <description>&lt;P&gt;&lt;A href="http://wiki.splunk.com/Community:40GUIDevelopment"&gt;http://wiki.splunk.com/Community:40GUIDevelopment&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 06:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-end-point-configured-in-web-conf-is-not-working/m-p/178809#M2391</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2018-06-19T06:51:57Z</dc:date>
    </item>
  </channel>
</rss>

