Endpoints
Fetch Random Vector
Fetches a random vector.
Request
This endpoint doesn't require any additional data.
Path
namespacepathstringdefault:
The namespace to use. When no namespace is specified, the default namespace will be used.
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.
curl
curl $UPSTASH_VECTOR_REST_URL/random \ -H "Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN"curl (Namespace)
curl $UPSTASH_VECTOR_REST_URL/random/ns \ -H "Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN"200 OK
{ "result": { "id": "id-0", "vector": [0.1, 0.2] }}