Php for putScript

how do i setup the params for ES php putScript()?

The following doesn't work.

$params = [
"lang"=> "painless",
"body"=> "painless javascript here"
$response = $client->putScript($params);

In Kibana: this works:

POST _scripts/script_name
"script": {
"lang": "painless",
"source": "painless javascript here"

Does this aid in your putScript discovery? -

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.