-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>enhancementdiscuss
Description
This is a feature request to add an endpoint for Painless to execute arbitrary scripts. I'm imaging something like the following:
POST /_painless/execute
{
"script": {
"source": "params.count / params.total"
"params": {
"count": 100
"total": 1000
}
}
and the response would be something like
{
"result": 0.1
}
Obviously this is a very simple example but with this type of interface we could replace the "math" (which uses Math.js) aggregation in TSVB with Painless and provide a way for the user to create scripts that allow them to manipulate data essentially the same way (but more secure). This would also provide a way to create interfaces for and testing and debugging painless scripts. I'm sure Rashid could use this as well in the new Canvas project to provide scripting as well.
exekias, tsg, adriansr, monicasarbu, andrewkroh and 5 moreruflin, consulthys, oli-code and niraveen
Metadata
Metadata
Assignees
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>enhancementdiscuss