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

# 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
        - union — 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.
        - 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
        - union — 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.
        - 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
  - 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` union, 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.

## Response `200`

successful operation

- object
  - `time` number, float — Time spent to process this request
  - `status` string
  - `result` boolean

## Other responses

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

## Changes

- **2024-08-13** `d530ad1be7de` — 2 breaking, 2 info
  - removed `subschema #1, subschema #2` from the `anyOf[#/components/schemas/CreateShardingKeyOperation]/create_sharding_key/shard_key` request property `anyOf` list
  - removed `subschema #1, subschema #2` from the `anyOf[#/components/schemas/DropShardingKeyOperation]/drop_sharding_key/shard_key` request property `anyOf` list
  - added `subschema #1, subschema #2` to the `anyOf[#/components/schemas/CreateShardingKeyOperation]/create_sharding_key/shard_key` request property `anyOf` list
  - added `subschema #1, subschema #2` to the `anyOf[#/components/schemas/DropShardingKeyOperation]/drop_sharding_key/shard_key` request property `anyOf` list

[Change history](https://skmtc.dev/qdrant/apis/qdrant-api/changes/collections/:collection_name/cluster/post.md)

---

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