mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 05:28:34 +00:00
This change hijacks the document APIs for the .watches index and prevents direct access to these APIs via REST. This hijacking is controlled by the "watcher.index.rest.direct_access" setting, this setting defaults to false which restricts access to the index. To allow direct access to the .watches index from the REST API set this setting to `true` Copied json files from core es to test this feature and added comments to the json files indicating why they have been copied from es core. Fixes elastic/elasticsearch#336 Original commit: elastic/x-pack-elasticsearch@22335750bd
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"bulk": {
|
|
"documentation": "This file is copied from es core just to verify that the .watches api hijacking works",
|
|
"methods": ["POST", "PUT"],
|
|
"url": {
|
|
"path": "/_bulk",
|
|
"paths": ["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"],
|
|
"parts": {
|
|
"index": {
|
|
"type" : "string",
|
|
"description" : "Default index for items which don't provide one"
|
|
},
|
|
"type": {
|
|
"type" : "string",
|
|
"description" : "Default document type for items which don't provide one"
|
|
}
|
|
},
|
|
"params": {
|
|
"consistency": {
|
|
"type" : "enum",
|
|
"options" : ["one", "quorum", "all"],
|
|
"description" : "Explicit write consistency setting for the operation"
|
|
},
|
|
"refresh": {
|
|
"type" : "boolean",
|
|
"description" : "Refresh the index after performing the operation"
|
|
},
|
|
"replication": {
|
|
"type" : "enum",
|
|
"options" : ["sync","async"],
|
|
"default" : "sync",
|
|
"description" : "Explicitely set the replication type"
|
|
},
|
|
"routing": {
|
|
"type" : "string",
|
|
"description" : "Specific routing value"
|
|
},
|
|
"timeout": {
|
|
"type" : "time",
|
|
"description" : "Explicit operation timeout"
|
|
},
|
|
"type": {
|
|
"type" : "string",
|
|
"description" : "Default document type for items which don't provide one"
|
|
}
|
|
}
|
|
},
|
|
"body": {
|
|
"description" : "The operation definition and data (action-data pairs), separated by newlines",
|
|
"required" : true,
|
|
"serialize" : "bulk"
|
|
}
|
|
}
|
|
}
|