Thanks for the info I have that in my configuration an excluded it from my example because that part worked.
Unfortunately there are a few issues with this method.
This only ever allows you to set it once. If you try to update the username/password it will return an error.
Also when I go to use this stored password from another modular input I need to know the username when calling the REST interface. So I have a few choices here. I hardcode in the username into the python code for the modular input which sort of defeats the purpose of having a setup page.
I'm going down the route of making a custom endpoint which will do the following
Store the username and proxy server address in a custom.conf
Update/create the password credentials directly via the REST interface as opposed to relying on the method in online examples.
I do wish there was an easy way to debug custom endpoints because the current errors that are returned from Splunk are utterly useless. http://imgur.com/a/basRS
also contains nothing useful
01-19-2017 10:32:42.492 +1000 ERROR AdminManagerExternal - <class 'splunk.admin.UsageException'>: Received no serialized data via stdin (mode: setup). Will not continue.