Update Vector
Updates a vector, data or metadata.
The vector will be updated int the default namespace by default. You can use a different namespace by specifying it in the request path.
Request
You can update a vector value, data, or metadata; or any combination of those.
The id of the vector.
The dense vector value to update to for dense and hybrid indexes.
The sparse vector value to update to for sparse and hybrid indexes.
The raw text data to update to.
The metadata to update to.
Whether to overwrite the whole metadata while updating
it, or patch the metadata (insert new fields or update or delete existing fields)
according to the RFC 7396 JSON Merge Patch algorithm.
OVERWRITE for overwrite, PATCH for patch.
For hybrid indexes either none or both of vector and sparseVector fields
must be present. It is not allowed to update only vector or sparseVector.
Path
The namespace to use. When no namespace is specified, the default namespace will be used.
Response
1 if any vector is updated, 0 otherwise.
curl $UPSTASH_VECTOR_REST_URL/update \ -X POST \ -H "Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN" \ -d '{ "id": "id-1", "metadata": { "link": "upstash.com" } }'curl $UPSTASH_VECTOR_REST_URL/update/ns \ -X POST \ -H "Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN" \ -d '{ "id": "id-2", "vector": [0.1, 0.2] }'{ "result": { "updated": 1 }}