> For the complete documentation index, see [llms.txt](https://docs.apica.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apica.io/platform-docs/irondb/api/rebalance.md).

# Rebalance

API description: See "Rebalance" in the [Administration API](https://apidocs.apica.io/irondb/admin/index.html)

## Getting Topology Rebalance State

This API call is for viewing the current topology rebalance state.

Data will be returned as a JSON document. The fields in this document are described below.

### Output

* `current` : The current topology in which this node resides.
* `next` : The next topology for this node.
* `state` : Current rebalance state for this node. Value is one of:
  * `TOPO_REBALANCE_IDLE` (no rebalance activity)
  * `TOPO_REBALANCE_VOTE` (establishing agreement on next hash across the cluster)
  * `TOPO_REBALANCE_REHASH` (relocating data)
  * `TOPO_REBALANCE_REHASH_VOTE` (waiting for data relocation completion on all nodes)
  * `TOPO_REBALANCE_CLEANUP` (removing data from old topology)
  * `TOPO_REBALANCE_COMPLETE` (local operations complete, switching to next topology)
  * `TOPO_REBALANCE_COMPLETE_VOTE` (waiting for all other nodes to complete and switch to the next topology)

During a rebalance operation, each node will proceed through the above states in order, returning to `TOPO_REBALANCE_IDLE` when finished. The topology that was listed as "next" is now "current", and "next" is now "-", meaning no next topology.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/platform-docs/irondb/api/rebalance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
