All Apps and Add-ons

How to handle custom parameters in rest modular input

cafissimo
Communicator

Hello,
I have developed a custom response handler class for TA.rest modular input and I would like to pass a custom parameter to it.
I know this is possible, by setting custom parameters in the input configuration page (key1=value, key2=value).
What I can't figure out is how I can access these parameters in my custom class.

class customHandler:

     def __init__(self,**args):
         pass

     def __call__(self, response_object,raw_response_output,response_type,req_args,endpoint):
         if response_type == "json":
             output = json.loads(raw_response_output)
             for record in output["logins"]:
                 print_xml_stream(json.dumps(record))
         else:
             print_xml_stream(raw_response_output)

Any help would be appreciated.
Thanks in advance.

0 Karma
1 Solution

Damien_Dallimor
Ultra Champion
0 Karma

Damien_Dallimor
Ultra Champion

alt text
alt text

0 Karma

cafissimo
Communicator

Thank you very much Damien!

0 Karma

cafissimo
Communicator
0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...