POST
/
vectors
/
update
# pip install pinecone[grpc]
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.update(
	id="id-3", 
	values=[4.0, 2.0], 
	set_metadata={"genre": "comedy"},
	namespace="example-namespace"
)
{}
# pip install pinecone[grpc]
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.update(
	id="id-3", 
	values=[4.0, 2.0], 
	set_metadata={"genre": "comedy"},
	namespace="example-namespace"
)
{}

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours from the console.

Body

application/json

The request for the update 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

The namespace containing the vector to update.

Example:

"example-namespace"

Response

200
application/json
A successful response.

The response for the update operation.