younifyd
Menu

Create shard key

Create shard key

PUT/collections/{collection_name}/shards

Use it in a workflow

  1. Add a step and choose the Qdrant connector.
  2. Pick the Create shard key action (under Distributed).
  3. Fill in the fields below, then reference the result from later steps as {{createShardKey.response.data}}.

Request

Path parameters

collection_namestringrequired

Name of the collection to create shards for

Query parameters

timeoutinteger

Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error.

Request body

Enter the body as JSON in the step's Body field.

shard_keyoneOfrequired
shards_numberinteger (uint32)

How many shards to create for this key If not specified, will use the default value from config

replication_factorinteger (uint32)

How many replicas to create for each shard If not specified, will use the default value from config

placementarray<integer (uint64)>

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_stateoneOf

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

json
{
  "shard_key": null,
  "shards_number": 0,
  "replication_factor": 0,
  "placement": [
    0
  ],
  "initial_state": null
}

Response

Returns 200 with an object. Read it in later steps with {{createShardKey.response.data.<field>}}.

usageoneOf

Default null

timenumber (float)

Time spent to process this request

statusstring
resultboolean
json
{
  "usage": null,
  "time": 0.002,
  "status": "ok",
  "result": false
}

Need more? See the Qdrant guide for connection setup and behaviour shared by every action.