Upstash Documentation

Fetch Random Vector

Fetches a random vector.
1 min read
gethttps://{endpoint}/random/{namespace}
gethttps://{endpoint}/random/{namespace}

Request#

This endpoint doesn't require any additional data.

Path#

namespacestring#

The namespace to use. When no namespace is specified, the default namespace will be used.

Default: ""

Response#

The response will be null if the namespace is empty.

idstringrequired#

The id of the vector.

vectornumber[]#

The dense vector value for dense and hybrid indexes.

sparseVectorObject[]#

The sparse vector value for sparse and hybrid indexes.

Show properties
indicesnumber[]#

Indices of the non-zero valued dimensions.

valuesnumber[]#

Values of the non-zero valued dimensions.