mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 14:35:04 +00:00
0d6fb1081a
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
67 lines
1.9 KiB
JSON
67 lines
1.9 KiB
JSON
{
|
|
"delete": {
|
|
"documentation": "This file is copied from es core just to verify that the .watches api hijacking works",
|
|
"methods": ["DELETE"],
|
|
"url": {
|
|
"path": "/{index}/{type}/{id}",
|
|
"paths": ["/{index}/{type}/{id}"],
|
|
"parts": {
|
|
"id": {
|
|
"type" : "string",
|
|
"required" : true,
|
|
"description" : "The document ID"
|
|
},
|
|
"index": {
|
|
"type" : "string",
|
|
"required" : true,
|
|
"description" : "The name of the index"
|
|
},
|
|
"type": {
|
|
"type" : "string",
|
|
"required" : true,
|
|
"description" : "The type of the document"
|
|
}
|
|
},
|
|
"params": {
|
|
"consistency": {
|
|
"type" : "enum",
|
|
"options" : ["one", "quorum", "all"],
|
|
"description" : "Specific write consistency setting for the operation"
|
|
},
|
|
"parent": {
|
|
"type" : "string",
|
|
"description" : "ID of parent document"
|
|
},
|
|
"refresh": {
|
|
"type" : "boolean",
|
|
"description" : "Refresh the index after performing the operation"
|
|
},
|
|
"replication": {
|
|
"type" : "enum",
|
|
"options" : ["sync","async"],
|
|
"default" : "sync",
|
|
"description" : "Specific replication type"
|
|
},
|
|
"routing": {
|
|
"type" : "string",
|
|
"description" : "Specific routing value"
|
|
},
|
|
"timeout": {
|
|
"type" : "time",
|
|
"description" : "Explicit operation timeout"
|
|
},
|
|
"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
|
|
}
|
|
}
|