Skip to content

Commit f48e07f

Browse files
authored
Merge pull request #49 from pinecone-io/sc-12923/add-partial-updates-to-the-docs
Add Update API call to docs
2 parents 8c77c13 + d7e208e commit f48e07f

File tree

2 files changed

+196
-0
lines changed

2 files changed

+196
-0
lines changed

specs/pinecone_api.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,48 @@
237237
]
238238
}
239239
},
240+
"/vectors/update": {
241+
"post": {
242+
"summary": "Update",
243+
"description": "The `Update` operation updates vector in a namespace.\nIf a value is included, it will overwrite the previous value.\nIf a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value.",
244+
"operationId": "update",
245+
"responses": {
246+
"200": {
247+
"description": "A successful response.",
248+
"content": {
249+
"application/json": {
250+
"schema": {
251+
"$ref": "#/components/schemas/UpdateResponse"
252+
}
253+
}
254+
}
255+
},
256+
"default": {
257+
"description": "An unexpected error response.",
258+
"content": {
259+
"application/json": {
260+
"schema": {
261+
"$ref": "#/components/schemas/rpcStatus"
262+
}
263+
}
264+
}
265+
}
266+
},
267+
"requestBody": {
268+
"content": {
269+
"application/json": {
270+
"schema": {
271+
"$ref": "#/components/schemas/UpdateRequest"
272+
}
273+
}
274+
},
275+
"required": true
276+
},
277+
"tags": [
278+
"Vector Operations"
279+
]
280+
}
281+
},
240282
"/vectors/upsert": {
241283
"post": {
242284
"summary": "Upsert",
@@ -766,6 +808,62 @@
766808
},
767809
"title": "The query results for a single `QueryVector`"
768810
},
811+
"UpdateRequest": {
812+
"type": "object",
813+
"properties": {
814+
"id": {
815+
"type": "string",
816+
"example": "example-vector-1",
817+
"description": "Vector's unique id.",
818+
"maxLength": 512,
819+
"minLength": 1,
820+
"required": [
821+
"id"
822+
]
823+
},
824+
"values": {
825+
"type": "array",
826+
"example": [
827+
0.1,
828+
0.2,
829+
0.3,
830+
0.4,
831+
0.5,
832+
0.6,
833+
0.7,
834+
0.8
835+
],
836+
"items": {
837+
"type": "number",
838+
"format": "float"
839+
},
840+
"description": "Vector data.",
841+
"maxLength": 20000,
842+
"minLength": 1
843+
},
844+
"setMetadata": {
845+
"type": "object",
846+
"example": {
847+
"genre": "documentary",
848+
"year": 2019
849+
},
850+
"description": "Metadata to *set* for the vector."
851+
},
852+
"namespace": {
853+
"type": "string",
854+
"example": "example-namespace",
855+
"description": "Namespace name where to update the vector."
856+
}
857+
},
858+
"description": "The request for the `Upsert` operation.",
859+
"required": [
860+
"id"
861+
]
862+
},
863+
"UpdateResponse": {
864+
"type": "object",
865+
"description": "The response for the `Update` operation."
866+
},
769867
"UpsertRequest": {
770868
"type": "object",
771869
"properties": {

specs/vector_service.openapi.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,48 @@
209209
]
210210
}
211211
},
212+
"/vectors/update": {
213+
"post": {
214+
"summary": "Update",
215+
"description": "The `Update` operation updates vector in a namespace.\nIf a value is included, it will overwrite the previous value.\nIf a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value.",
216+
"operationId": "update",
217+
"responses": {
218+
"200": {
219+
"description": "A successful response.",
220+
"content": {
221+
"application/json": {
222+
"schema": {
223+
"$ref": "#/components/schemas/UpdateResponse"
224+
}
225+
}
226+
}
227+
},
228+
"default": {
229+
"description": "An unexpected error response.",
230+
"content": {
231+
"application/json": {
232+
"schema": {
233+
"$ref": "#/components/schemas/rpcStatus"
234+
}
235+
}
236+
}
237+
}
238+
},
239+
"requestBody": {
240+
"content": {
241+
"application/json": {
242+
"schema": {
243+
"$ref": "#/components/schemas/UpdateRequest"
244+
}
245+
}
246+
},
247+
"required": true
248+
},
249+
"tags": [
250+
"Vector Operations"
251+
]
252+
}
253+
},
212254
"/vectors/upsert": {
213255
"post": {
214256
"summary": "Upsert",
@@ -566,6 +608,62 @@
566608
},
567609
"title": "The query results for a single `QueryVector`"
568610
},
611+
"UpdateRequest": {
612+
"type": "object",
613+
"properties": {
614+
"id": {
615+
"type": "string",
616+
"example": "example-vector-1",
617+
"description": "Vector's unique id.",
618+
"maxLength": 512,
619+
"minLength": 1,
620+
"required": [
621+
"id"
622+
]
623+
},
624+
"values": {
625+
"type": "array",
626+
"example": [
627+
0.1,
628+
0.2,
629+
0.3,
630+
0.4,
631+
0.5,
632+
0.6,
633+
0.7,
634+
0.8
635+
],
636+
"items": {
637+
"type": "number",
638+
"format": "float"
639+
},
640+
"description": "Vector data.",
641+
"maxLength": 20000,
642+
"minLength": 1
643+
},
644+
"setMetadata": {
645+
"type": "object",
646+
"example": {
647+
"genre": "documentary",
648+
"year": 2019
649+
},
650+
"description": "Metadata to *set* for the vector."
651+
},
652+
"namespace": {
653+
"type": "string",
654+
"example": "example-namespace",
655+
"description": "Namespace name where to update the vector."
656+
}
657+
},
658+
"description": "The request for the `Upsert` operation.",
659+
"required": [
660+
"id"
661+
]
662+
},
663+
"UpdateResponse": {
664+
"type": "object",
665+
"description": "The response for the `Update` operation."
666+
},
569667
"UpsertRequest": {
570668
"type": "object",
571669
"properties": {

0 commit comments

Comments
 (0)