shardkey

Shards

The shard key determines the distribution of the collection’s documents among the cluster’s shards.

This is specified via the shardkey query parameter.

Examples

return documents with given shardkey

GET 127.0.0.1:8080/test/coll?shardkey={"skey":"A"}

write document specifying the shardkey

$ http POST "127.0.0.1:8080/test/coll?shardkey={"skey":"B"} desc="just a document"

Documentation references

How to use the examples

The examples make use of the brilliant httpie CLI HTTP client and are ment to be used with RESTHeart stareted on the localhost without the authentication enabled.

Eventually pass username and password with the -a username:password option.