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 2ad2db2964d..27083503195 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 class RestPutStoredScriptAction extends BaseRestHandler { 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 c61aecd6bb2..83bb690cc04 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 1bdc546ad03..2240f0e1a0b 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 45b97f9f285..34bd4f63c28 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" : {