OpenSearch/rest-api-spec/api/cluster.reroute.json
Boaz Leskes 4f8ddd97bf [Rest] reroute API response didn't filter metadata
By default the reroute API should return the new cluster state, excluding the metadata. It was however it was wrongly using an old parameter (filter_metadata) and thus failed to do so. This commits restores but wiring it to the correct `metric` parameter. We also add an enum representing the possible metrics, to avoid similar future mistakes.

Closes #7520
Closes #7523
2014-09-10 14:48:06 +02:00

39 lines
1.2 KiB
JSON

{
"cluster.reroute": {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cluster-reroute.html",
"methods": ["POST"],
"url": {
"path": "/_cluster/reroute",
"paths": ["/_cluster/reroute"],
"parts": {
},
"params": {
"dry_run": {
"type" : "boolean",
"description" : "Simulate the operation only and return the resulting state"
},
"explain": {
"type" : "boolean",
"description" : "Return an explanation of why the commands can or cannot be executed"
},
"metric": {
"type": "list",
"options": ["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"],
"description": "Limit the information returned to the specified metrics. Defaults to all but metadata"
},
"master_timeout": {
"type" : "time",
"description" : "Explicit operation timeout for connection to master node"
},
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
}
}
},
"body": {
"description" : "The definition of `commands` to perform (`move`, `cancel`, `allocate`)"
}
}
}