<?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: REST MODULAR INPUT APP global name 'raw_response_output' is not defined in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-MODULAR-INPUT-APP-global-name-raw-response-output-is-not/m-p/115530#M8554</link>
    <description>&lt;P&gt;There's a typo in your list of arguments, the parameter is declared as &lt;CODE&gt;raw_response_ouput&lt;/CODE&gt; but used as &lt;CODE&gt;raw_response_output&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Apr 2014 22:05:15 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-04-01T22:05:15Z</dc:date>
    <item>
      <title>REST MODULAR INPUT APP global name 'raw_response_output' is not defined</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-MODULAR-INPUT-APP-global-name-raw-response-output-is-not/m-p/115529#M8553</link>
      <description>&lt;P&gt;Using the REST Modular Input App on my test box, I'm able to get json correctly displayed, but I get a different behavior when I deployed the app.  I'm using a 6.0 Heavy Forwarder which forwards to 5.x Indexer.  It works fine with the default response handler though. I have my custom response handler correctly showing in inputs.conf.&lt;/P&gt;

&lt;P&gt;Looking at the logs, I see this:&lt;/P&gt;

&lt;P&gt;"...ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/rest_ta/bin/rest.py" NameError: global name 'raw_response_output' is not defined..."&lt;/P&gt;

&lt;P&gt;My custom forwarder looks like this:&lt;/P&gt;

&lt;P&gt;class MyCustomerJSONHandler:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;def __init__(self, **args):
    pass

def __call__(self,response_object,raw_response_ouput,response_type,req_args,endpoint):

    if response_type == "json":
        output = json.loads(raw_response_output)
        for result in output["items"]:
            print_xml_stream(json.dumps(result))


    else:
        print_xml_stream(raw_response_output)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-MODULAR-INPUT-APP-global-name-raw-response-output-is-not/m-p/115529#M8553</guid>
      <dc:creator>mnaim</dc:creator>
      <dc:date>2020-09-28T16:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: REST MODULAR INPUT APP global name 'raw_response_output' is not defined</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-MODULAR-INPUT-APP-global-name-raw-response-output-is-not/m-p/115530#M8554</link>
      <description>&lt;P&gt;There's a typo in your list of arguments, the parameter is declared as &lt;CODE&gt;raw_response_ouput&lt;/CODE&gt; but used as &lt;CODE&gt;raw_response_output&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 22:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-MODULAR-INPUT-APP-global-name-raw-response-output-is-not/m-p/115530#M8554</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-01T22:05:15Z</dc:date>
    </item>
  </channel>
</rss>

