Upsert
Inserts one or more entities into a collection.
POST
https://${MILVUS_URI}/v1/vector/upsert
Example
None
Request
Parameters
No query parameters required
No path parameters required
Request Body
{
"collectionName": "string",
"dbName": "string"
}
Parameter | Description |
---|---|
dbName | string The name of the database. |
collectionName | string(required) The name of the collection to which entities will be inserted. |
data | object(required) An entity object. Note that the keys in the entity should match the collection schema. |
{
"collectionName": "string",
"data": [],
"dbName": "string"
}
Parameter | Description |
---|---|
dbName | string The name of the database. |
collectionName | string(required) The name of the collection to which entities will be inserted. |
data | array(required) An array of entity objects. Note that the keys in an entity object should match the collection schema |
Response
Returns the number of inserted entities and an array of their IDs.
Response Bodies
- Response body if we process your request successfully
{
"code": 200,
"data": {
"upsertCount": "integer"
}
}
- Response body if we failed to process your request
{
"code": integer,
"message": string
}
Properties
The properties in the returned response are listed in the following table.
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | object A data object. |
data.upsertCount | integer The number of inserted entities. |
data.upsertIds | array An array of the IDs of inserted entities. |
message | string Indicates the possible reason for the reported error. |
Possible Errors
None