POST
/
vectors
/
update
curl --request POST \
  --url https://{index_host}/vectors/update \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "example-vector-1",
  "values": [
    0.1,
    0.2,
    0.3,
    0.4,
    0.5,
    0.6,
    0.7,
    0.8
  ],
  "sparseValues": {
    "indices": [
      1,
      312,
      822,
      14,
      980
    ],
    "values": [
      0.1,
      0.2,
      0.3,
      0.4,
      0.5
    ]
  },
  "setMetadata": {
    "genre": "documentary",
    "year": 2019
  },
  "namespace": "example-namespace"
}'
{}

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours at https://www.pinecone.io/start/

Body

application/json

The request for the upsert operation.

id
string
required

Vector's unique id.

Required string length: 1 - 512
Example:

"example-vector-1"

values
number[]

Vector data.

Example:
[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]
sparseValues
object

Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length.

setMetadata
object

Metadata to set for the vector.

Example:
{ "genre": "documentary", "year": 2019 }
namespace
string

Namespace name where to update the vector.

Example:

"example-namespace"

Response

200
application/json
A successful response.

The response for the update operation.

Was this page helpful?