> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.qdrant.tech/v-1-17-x/api-reference/distributed/update-collection-cluster/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.qdrant.tech/_mcp/server. # Update cluster setup POST http://localhost:6333/collections/{collection_name}/cluster Content-Type: application/json Updates the cluster configuration for a specified collection. Reference: https://api.qdrant.tech/api-reference/distributed/update-collection-cluster ## Authentication - `api-key` header (required) — API Key authentication via header ## Servers - `http://localhost:6333` (http, default) - `https://localhost:6333` (https) ## Request ### Path parameters - `collection_name` (string, required) — Name of the collection on which to to apply the cluster update operation ### Query parameters - `timeout` (integer, optional) — Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error. ### Body (application/json) This endpoint expects a ClusterOperations. - `ClusterOperations` ## Response ### 200 successful operation - `usage` (CollectionsCollectionNameClusterPostResponsesContentApplicationJsonSchemaUsage, optional) - `time` (double, optional) — Time spent to process this request - `status` (string, optional) - `result` (boolean, optional) ## Types ### MoveShardOperation - `move_shard` (MoveShard, required) ### ReplicateShardOperation - `replicate_shard` (ReplicateShard, required) ### AbortTransferOperation - `abort_transfer` (AbortShardTransfer, required) ### DropReplicaOperation - `drop_replica` (Replica, required) ### CreateShardingKeyOperation - `create_sharding_key` (CreateShardingKey, required) ### DropShardingKeyOperation - `drop_sharding_key` (DropShardingKey, required) ### RestartTransferOperation - `restart_transfer` (RestartTransfer, required) ### StartReshardingOperation - `start_resharding` (StartResharding, required) ### AbortReshardingOperation - `abort_resharding` (AbortResharding, required) ### ReplicatePointsOperation - `replicate_points` (ReplicatePoints, required) ### CollectionsCollectionNameClusterPostResponsesContentApplicationJsonSchemaUsage ### MoveShard - `shard_id` (uint, required) - `to_peer_id` (uint64, required) - `from_peer_id` (uint64, required) - `method` (MoveShardMethod, optional) — Method for transferring the shard from one node to another ### ReplicateShard - `shard_id` (uint, required) - `to_peer_id` (uint64, required) - `from_peer_id` (uint64, required) - `method` (ReplicateShardMethod, optional) — Method for transferring the shard from one node to another ### AbortShardTransfer - `shard_id` (uint, required) - `to_peer_id` (uint64, required) - `from_peer_id` (uint64, required) ### Replica - `shard_id` (uint, required) - `peer_id` (uint64, required) ### CreateShardingKey - `shard_key` (ShardKey, required) - `shards_number` (uint, optional, nullable) — How many shards to create for this key If not specified, will use the default value from config - `replication_factor` (uint, optional, nullable) — How many replicas to create for each shard If not specified, will use the default value from config - `placement` (list of uint64, optional, 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` (CreateShardingKeyInitialState, optional) — 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 ### DropShardingKey - `shard_key` (ShardKey, required) ### RestartTransfer - `shard_id` (uint, required) - `from_peer_id` (uint64, required) - `to_peer_id` (uint64, required) - `method` (enum, 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. - Allowed values: `stream_records`, `snapshot`, `wal_delta`, `resharding_stream_records` ### StartResharding - `direction` (enum, required) — Resharding direction, scale up or down in number of shards - `up` - Scale up, add a new shard - `down` - Scale down, remove a shard - Allowed values: `up`, `down` - `peer_id` (uint64, optional, nullable) - `shard_key` (StartReshardingShardKey, optional) ### AbortResharding ### ReplicatePoints - `from_shard_key` (ShardKey, required) - `to_shard_key` (ShardKey, required) - `filter` (ReplicatePointsFilter, optional) ### Usage Usage of the hardware resources, spent to process the request - `hardware` (UsageHardware, optional) - `inference` (UsageInference, optional) ### MoveShardMethod Method for transferring the shard from one node to another ### ReplicateShardMethod Method for transferring the shard from one node to another ### ShardKey ### CreateShardingKeyInitialState 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 ### StartReshardingShardKey ### ReplicatePointsFilter ### UsageHardware ### UsageInference ### Filter - `should` (FilterShould, optional) — At least one of those conditions should match - `min_should` (FilterMinShould, optional) — At least minimum amount of given conditions should match - `must` (FilterMust, optional) — All conditions must match - `must_not` (FilterMustNot, optional) — All conditions must NOT match ### 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) ### InferenceUsage - `models` (map from string to ModelUsage, required) ### FilterShould At least one of those conditions should match ### FilterMinShould At least minimum amount of given conditions should match ### FilterMust All conditions must match ### FilterMustNot All conditions must NOT match ### ModelUsage - `tokens` (uint64, required) ### MinShould - `conditions` (list of Condition, required) - `min_count` (integer, required) ### Condition ### FieldCondition All possible payload filtering conditions - `key` (string, required) — Payload key - `match` (FieldConditionMatch, optional) — Check if point has field with a given value - `range` (FieldConditionRange, optional) — Check if points value lies in a given range - `geo_bounding_box` (FieldConditionGeoBoundingBox, optional) — Check if points geolocation lies in a given area - `geo_radius` (FieldConditionGeoRadius, optional) — Check if geo point is within a given radius - `geo_polygon` (FieldConditionGeoPolygon, optional) — Check if geo point is within a given polygon - `values_count` (FieldConditionValuesCount, optional) — Check number of values of the field - `is_empty` (boolean, optional, nullable) — Check that the field is empty, alternative syntax for `is_empty: "field_name"` - `is_null` (boolean, optional, nullable) — Check that the field is null, alternative syntax for `is_null: "field_name"` ### IsEmptyCondition Select points with empty payload for a specified field - `is_empty` (PayloadField, required) — Payload field ### IsNullCondition Select points with null payload for a specified field - `is_null` (PayloadField, required) — Payload field ### HasIdCondition ID-based filtering condition - `has_id` (list of ExtendedPointId, required) ### HasVectorCondition Filter points which have specific vector assigned - `has_vector` (string, required) ### NestedCondition - `nested` (Nested, required) — Select points with payload for a specified nested field ### FieldConditionMatch Check if point has field with a given value ### FieldConditionRange Check if points value lies in a given range ### FieldConditionGeoBoundingBox Check if points geolocation lies in a given area ### FieldConditionGeoRadius Check if geo point is within a given radius ### FieldConditionGeoPolygon Check if geo point is within a given polygon ### FieldConditionValuesCount Check number of values of the field ### PayloadField Payload field - `key` (string, required) — Payload field name ### ExtendedPointId Type, used for specifying point ID in user interface ### Nested Select points with payload for a specified nested field - `key` (string, required) - `filter` (Filter, required) ### GeoBoundingBox Geo filter request Matches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges - `top_left` (GeoPoint, required) — Geo point payload schema - `bottom_right` (GeoPoint, required) — Geo point payload schema ### GeoRadius Geo filter request Matches coordinates inside the circle of `radius` and center with coordinates `center` - `center` (GeoPoint, required) — Geo point payload schema - `radius` (double, required) — Radius of the area in meters ### GeoPolygon Geo filter request Matches coordinates inside the polygon, defined by `exterior` and `interiors` - `exterior` (GeoLineString, required) — Ordered sequence of GeoPoints representing the line - `interiors` (list of GeoLineString, optional, nullable) — Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same. ### ValuesCount Values count filter request - `lt` (integer, optional, nullable) — point.key.length() \< values\_count.lt - `gt` (integer, optional, nullable) — point.key.length() > values_count.gt - `gte` (integer, optional, nullable) — point.key.length() >= values_count.gte - `lte` (integer, optional, nullable) — point.key.length() \<= values\_count.lte ### GeoPoint Geo point payload schema - `lon` (double, required) - `lat` (double, required) ### GeoLineString Ordered sequence of GeoPoints representing the line - `points` (list of GeoPoint, required) ## Examples **Request** ```json {} ``` **Response** ```json { "usage": { "hardware": { "cpu": 1, "payload_io_read": 1, "payload_io_write": 1, "payload_index_io_read": 1, "payload_index_io_write": 1, "vector_io_read": 1, "vector_io_write": 1 }, "inference": { "models": {} } }, "time": 0.002, "status": "ok", "result": true } ``` **SDK Code** ```python import requests url = "http://localhost:6333/collections/collection_name/cluster" payload = {} headers = { "api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'http://localhost:6333/collections/collection_name/cluster'; const options = { method: 'POST', headers: {'api-key': '', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "http://localhost:6333/collections/collection_name/cluster" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("http://localhost:6333/collections/collection_name/cluster") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url) request["api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("http://localhost:6333/collections/collection_name/cluster") .header("api-key", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'http://localhost:6333/collections/collection_name/cluster', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("http://localhost:6333/collections/collection_name/cluster"); var request = new RestRequest(Method.POST); request.AddHeader("api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "api-key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:6333/collections/collection_name/cluster")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```