All Apps and Add-ons

Implement logic when saving parameters using Add On Builder

mas
Path Finder

Hi! Anyone experienced with the new AddOn Builder (3.0.1)?

I would like to implement some logic before saving an "add-on setup parameter" or a "data input parameter". To be more precise, I would like to manipulate string values, concatenating them and encoding them with Base64. I spent some time doing reverse-engineering of Python code, but it looks like parameters are saved according to some generic logic and it is not possible to override it for specific parameters.

Which is the right way to do this? Where should I place my code, so that it survives to future changed made using the Add On Builder?

0 Karma

chli_splunk
Splunk Employee
Splunk Employee

You can customize this function in python code

def validate_input(helper, definition):
    """Implement your own validation logic to validate the input stanza configurations"""
    # This example accesses the modular input variable
    # text = definition.parameters.get('text', None)
    pass
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...