-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Painless Endpoint to Execute Scripts #27875
Copy link
Copy link
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>enhancementdiscuss
Type
Fields
Give feedbackNo fields configured for issues without a type.