> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /repartition/graph

```
URL: http://<db.host>:<db.port>/repartition/graph
```

Rebalances an existing partitioned graph.

IMPORTANT: It's highly recommended that you review the
[Graphs and Solvers](../../graph_solver/network_graph_solver/) concepts
documentation, the [Graph REST Tutorial](../../guides/graph_rest_guide/),
and/or some [graph examples](/content/guides/tags/graph) before using this
endpoint.

## Input Parameter Description

<ParamField body="graph_name" type="string">
  Name of the graph resource to rebalance.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).

  <Expandable title="options">
    <ParamField body="new_graph_name">
      If a non-empty value is specified, the original graph will be kept (non-default behavior) and a new balanced graph will be created under this given name.  When the value is empty (default), the generated 'balanced' graph will replace the original 'unbalanced' graph under the same graph name.

      The default value is ''.
    </ParamField>

    <ParamField body="source_node">
      The distributed shortest path solve is run from this source node to all the nodes in the graph to create balanced partitions using the iso-distance levels of the solution.  The source node is selected by the rebalance algorithm automatically (default case when the value is an empty string). Otherwise, the user specified node is used as the source.

      The default value is ''.
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'repartition\_graph\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /repartition/graph endpoint:

  <Expandable title="data_str">
    <ResponseField name="result" type="boolean">
      Indicates a successful rebalancing on all servers.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
