diff --git a/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java b/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java index 2ad2db2964d56..27083503195e0 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java @@ -41,6 +41,7 @@ public RestPutStoredScriptAction(Settings settings, RestController controller) { controller.registerHandler(POST, "/_scripts/{id}", this); controller.registerHandler(PUT, "/_scripts/{id}", this); + controller.registerHandler(POST, "/_scripts/{id}/{context}", this); controller.registerHandler(PUT, "/_scripts/{id}/{context}", this); } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json b/rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json index c61aecd6bb2a8..83bb690cc0428 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json @@ -10,11 +10,6 @@ "type" : "string", "description" : "Script ID", "required" : true - }, - "lang" : { - "type" : "string", - "description" : "Script language", - "required" : true } }, "params" : { diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json b/rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json index 1bdc546ad03ac..2240f0e1a0b75 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json @@ -10,11 +10,6 @@ "type" : "string", "description" : "Script ID", "required" : true - }, - "lang" : { - "type" : "string", - "description" : "Script language", - "required" : true } }, "params" : { diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/put_script.json b/rest-api-spec/src/main/resources/rest-api-spec/api/put_script.json index 45b97f9f2857a..34bd4f63c285e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/put_script.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/put_script.json @@ -11,10 +11,9 @@ "description" : "Script ID", "required" : true }, - "lang" : { + "context" : { "type" : "string", - "description" : "Script language", - "required" : true + "description" : "Script context" } }, "params" : {