---
title: "Update collection cluster setup"
method: POST
path: "/collections/{collection_name}/cluster"
tags: ["Distributed"]
---

# Update collection cluster setup

`POST /collections/{collection_name}/cluster`

## Path parameters

- `collection_name` string, required

## Query parameters

- `timeout` integer

## Request body

- union
  - MoveShardOperation
    - `move_shard` MoveShard, required
      - `shard_id` integer, required
      - `to_peer_id` integer, required
      - `from_peer_id` integer, required
      - `method` union — Method for transferring the shard from one node to another
        - 'stream_records' | 'snapshot' | 'wal_delta' | 'resharding_stream_records' — Methods for transferring a shard from one node to another. - `stream_records` - Stream all shard records in batches until the whole shard is transferred. - `snapshot` - Snapshot the shard, transfer and restore it on the receiver. - `wal_delta` - Attempt to transfer shard difference by WAL delta. - `resharding_stream_records` - Shard transfer for resharding: stream all records in batches until all points are transferred.
        - unknown
  - ReplicateShardOperation
    - `replicate_shard` ReplicateShard, required
      - `shard_id` integer, required
      - `to_peer_id` integer, required
      - `from_peer_id` integer, required
      - `method` union — Method for transferring the shard from one node to another
        - 'stream_records' | 'snapshot' | 'wal_delta' | 'resharding_stream_records' — Methods for transferring a shard from one node to another. - `stream_records` - Stream all shard records in batches until the whole shard is transferred. - `snapshot` - Snapshot the shard, transfer and restore it on the receiver. - `wal_delta` - Attempt to transfer shard difference by WAL delta. - `resharding_stream_records` - Shard transfer for resharding: stream all records in batches until all points are transferred.
        - unknown
  - AbortTransferOperation
    - `abort_transfer` AbortShardTransfer, required
      - `shard_id` integer, required
      - `to_peer_id` integer, required
      - `from_peer_id` integer, required
  - DropReplicaOperation
    - `drop_replica` Replica, required
      - `shard_id` integer, required
      - `peer_id` integer, required
  - CreateShardingKeyOperation
    - `create_sharding_key` CreateShardingKey, required
      - `shard_key` union, required
        - string
        - integer
      - `shards_number` integer, nullable — How many shards to create for this key If not specified, will use the default value from config
      - `replication_factor` integer, nullable — How many replicas to create for each shard If not specified, will use the default value from config
      - `placement` integer[], nullable — Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers
      - `initial_state` union — Initial state of the shards for this key If not specified, will be `Initializing` first and then `Active` Warning: do not change this unless you know what you are doing
        - 'Active' | 'Dead' | 'Partial' | 'Initializing' | 'Listener' | 'PartialSnapshot' | 'Recovery' | 'Resharding' | 'ReshardingScaleDown' | 'ActiveRead' | 'ManualRecovery' — State of the single shard within a replica set.
        - unknown
  - DropShardingKeyOperation
    - `drop_sharding_key` DropShardingKey, required
      - `shard_key` union, required
        - string
        - integer
  - RestartTransferOperation
    - `restart_transfer` RestartTransfer, required
      - `shard_id` integer, required
      - `from_peer_id` integer, required
      - `to_peer_id` integer, required
      - `method` 'stream_records' | 'snapshot' | 'wal_delta' | 'resharding_stream_records', required — Methods for transferring a shard from one node to another. - `stream_records` - Stream all shard records in batches until the whole shard is transferred. - `snapshot` - Snapshot the shard, transfer and restore it on the receiver. - `wal_delta` - Attempt to transfer shard difference by WAL delta. - `resharding_stream_records` - Shard transfer for resharding: stream all records in batches until all points are transferred.
  - StartReshardingOperation
    - `start_resharding` StartResharding, required
      - `direction` 'up' | 'down', required — Resharding direction, scale up or down in number of shards - `up` - Scale up, add a new shard - `down` - Scale down, remove a shard
      - `peer_id` integer, nullable — Peer to create the new shard on, or to migrate points away from when scaling down. If not specified, the least loaded peer is picked when scaling up, a peer holding the removed shard when scaling down.
      - `shard_key` union — Custom shard key to reshard, must already exist. If not specified, shards without a shard key are resharded.
        - union
          - string
          - integer
        - unknown
  - AbortReshardingOperation
    - `abort_resharding` AbortResharding, required
  - ReplicatePointsOperation
    - `replicate_points` ReplicatePoints, required
      - `filter` union
        - Filter
          - `should` union — At least one of those conditions should match
            - union
              - …
            - Condition[]
              - …
            - unknown
          - `min_should` union — At least minimum amount of given conditions should match
            - MinShould
              - …
            - unknown
          - `must` union — All conditions must match
            - union
              - …
            - Condition[]
              - …
            - unknown
          - `must_not` union — All conditions must NOT match
            - union
              - …
            - Condition[]
              - …
            - unknown
        - unknown
      - `from_shard_key` union, required
        - string
        - integer
      - `to_shard_key` union, required
        - string
        - integer

## Response `200`

successful operation

- object
  - `usage` union
    - Usage — Usage of the hardware resources, spent to process the request
      - `hardware` union
        - HardwareUsage — Usage of the hardware resources, spent to process the request
          - `cpu` integer, required
          - `payload_io_read` integer, required
          - `payload_io_write` integer, required
          - `payload_index_io_read` integer, required
          - `payload_index_io_write` integer, required
          - `vector_io_read` integer, required
          - `vector_io_write` integer, required
        - unknown
      - `inference` union
        - InferenceUsage
          - `models` object, required
        - unknown
    - unknown
  - `time` number, float — Time spent to process this request
  - `status` string
  - `result` boolean

## Other responses

- `default` — error
- `4XX` — error

---

[API](https://skmtc.net/qdrant/apis/qdrant-api.md) · [All operations](https://skmtc.net/qdrant/apis/qdrant-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qdrant/qdrant-api/revisions/d08b1f613f29/schema)
