state.asciidoc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [[cluster-state]]
  2. == Cluster State
  3. The cluster state API allows to get a comprehensive state information of
  4. the whole cluster.
  5. [source,js]
  6. --------------------------------------------------
  7. $ curl -XGET 'http://localhost:9200/_cluster/state'
  8. --------------------------------------------------
  9. By default, the cluster state request is routed to the master node, to
  10. ensure that the latest cluster state is returned.
  11. For debugging purposes, you can retrieve the cluster state local to a
  12. particular node by adding `local=true` to the query string.
  13. [float]
  14. === Response Filters
  15. It is possible to filter the cluster state response using the following
  16. REST parameters:
  17. `filter_nodes`::
  18. Set to `true` to filter out the `nodes` part of the
  19. response.
  20. `filter_routing_table`::
  21. Set to `true` to filter out the `routing_table`
  22. part of the response.
  23. `filter_metadata`::
  24. Set to `true` to filter out the `metadata` part of the
  25. response.
  26. `filter_blocks`::
  27. Set to `true` to filter out the `blocks` part of the
  28. response.
  29. `filter_indices`::
  30. When not filtering metadata, a comma separated list of
  31. indices to include in the response.
  32. Example follows:
  33. [source,js]
  34. --------------------------------------------------
  35. $ curl -XGET 'http://localhost:9200/_cluster/state?filter_nodes=true'
  36. --------------------------------------------------