List the cluster trash #
List every node’s trash, merged into one cluster-wide, namespace-centric view. The request may be sent to any node; the node that receives it aggregates the trash of every cluster member.
Examples #
GET /_cluster/trash
A typical item — here a deleted namespace held on two nodes:
{
"nodes_scanned": 2,
"unreachable_nodes": [],
"retention_secs": 86400,
"items": [
{
"name": "1788916375_namespace-website",
"deleted_at": 1788916375,
"bytes": 2097152,
"files": 42,
"kind": "namespace",
"namespace": "website",
"collections": 3,
"shard_groups": 12,
"shard_copies": 14,
"restorable": true,
"holders": [
{ "node_id": "…", "node_name": "pizza-1", "bytes": 1048576, "files": 21 },
{ "node_id": "…", "node_name": "pizza-2", "bytes": 1048576, "files": 21 }
]
}
]
}
Request #
GET /_cluster/trash
Response #
items— newest first; each item merges every node that still holds a copy of the data intoholders.kind—namespaceorcollection, parsed from the delete-time snapshot. Items without a snapshot (legacy items swept by the orphan scanner before snapshots existed, or a failed snapshot write) reportrestorable: falseand cannot be restored.retention_secs— the effective retention; items are physically deleted once older than this.unreachable_nodes— members that could not be reached; the list may be incomplete for items they hold.