I'm interested in programmatically creating a scripted field using Painless. Namely, I want to create a string type that is formatted as a URL. I can create the field without problem. I can also push the Kibana configuration via the create index-pattern API. However, I'd like to be able to template out the base URL into a Kibana config value. This way a user can just change the config value (or via a script) for their environment and not have to change the Painless script.
The only other option that I can think of is to template the index pattern on disk, render the template, and update the index pattern.