mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
The get, put and delete indexed script apis map to get, index and delete api and internally create those corresponding requests. We need to make sure that the original headers are handed over to the new request by passing the original request in the constructor when creating the new one. Also streamlined the support for version and version_type in the REST layer since the parameters were not consistently parsed and set to the internal java API requests. Modified the REST delete template and delete script actions to make use of a client instead of using the `ScriptService` directly. Closes #7569
34 lines
914 B
JSON
34 lines
914 B
JSON
{
|
|
"get_script": {
|
|
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html",
|
|
"methods": ["GET"],
|
|
"url": {
|
|
"path": "/_scripts/{lang}/{id}",
|
|
"paths": [ "/_scripts/{lang}/{id}" ],
|
|
"parts": {
|
|
"id": {
|
|
"type" : "string",
|
|
"description" : "Script ID",
|
|
"required" : true
|
|
},
|
|
"lang" : {
|
|
"type" : "string",
|
|
"description" : "Script language",
|
|
"required" : true
|
|
}
|
|
},
|
|
"params" : {
|
|
"version": {
|
|
"type": "number",
|
|
"description": "Explicit version number for concurrency control"
|
|
},
|
|
"version_type": {
|
|
"type": "enum",
|
|
"options": ["internal", "external", "external_gte", "force"],
|
|
"description": "Specific version type"
|
|
}
|
|
}
|
|
},
|
|
"body": null
|
|
}
|
|
} |