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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

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 ...