Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Replace entire payload
client.points.overwrite_payload(
"my_collection",
payload={"name": "overwritten", "new_field": 42},
ids=[3]
)
print("✓ Overwrote payload on point 3")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
await client.points.overwritePayload('my_collection', { name: 'overwritten', new_field: 42 }, { ids: [3] });
console.log('Overwrote payload on point 3');
client.close();curl -X PUT "http://localhost:6575/collections/my_collection/points/payload" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>' \
-d '{
"payload": {"name": "overwritten", "new_field": 42},
"points": [3]
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points/payload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
'name' => 'overwritten',
'new_field' => 42
],
'points' => [
3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:6575/collections/{collection_name}/points/payload"
payload := strings.NewReader("{\n \"payload\": {\n \"name\": \"overwritten\",\n \"new_field\": 42\n },\n \"points\": [\n 3\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:6575/collections/{collection_name}/points/payload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {\n \"name\": \"overwritten\",\n \"new_field\": 42\n },\n \"points\": [\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points/payload")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payload\": {\n \"name\": \"overwritten\",\n \"new_field\": 42\n },\n \"points\": [\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.000065268,
"status": "ok",
"result": {
"operation_id": 0,
"status": "Completed"
}
}{
"status": {
"error": "Collection `my_collection` doesn't exist!"
},
"time": 123
}Points
Overwrite payload
Replace the entire payload on the specified points. All existing payload fields are removed and replaced with the provided object. Use the set payload endpoint to merge instead.
PUT
/
collections
/
{collection_name}
/
points
/
payload
Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Replace entire payload
client.points.overwrite_payload(
"my_collection",
payload={"name": "overwritten", "new_field": 42},
ids=[3]
)
print("✓ Overwrote payload on point 3")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
await client.points.overwritePayload('my_collection', { name: 'overwritten', new_field: 42 }, { ids: [3] });
console.log('Overwrote payload on point 3');
client.close();curl -X PUT "http://localhost:6575/collections/my_collection/points/payload" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>' \
-d '{
"payload": {"name": "overwritten", "new_field": 42},
"points": [3]
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points/payload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
'name' => 'overwritten',
'new_field' => 42
],
'points' => [
3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:6575/collections/{collection_name}/points/payload"
payload := strings.NewReader("{\n \"payload\": {\n \"name\": \"overwritten\",\n \"new_field\": 42\n },\n \"points\": [\n 3\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:6575/collections/{collection_name}/points/payload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {\n \"name\": \"overwritten\",\n \"new_field\": 42\n },\n \"points\": [\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points/payload")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payload\": {\n \"name\": \"overwritten\",\n \"new_field\": 42\n },\n \"points\": [\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.000065268,
"status": "ok",
"result": {
"operation_id": 0,
"status": "Completed"
}
}{
"status": {
"error": "Collection `my_collection` doesn't exist!"
},
"time": 123
}Authorizations
Admin JWT or access token for authenticating requests to VectorAI DB.
Path Parameters
The name of the collection containing the target points.
Example:
"my_collection"
Body
application/json
Response
Payload overwritten
Resource usage information for this request.
Show child attributes
Show child attributes
Time spent to process this request, in seconds.
Example:
0.000065268
Operation status. Returns ok on success.
Example:
"ok"
Operation result containing the status of the payload overwrite.
Show child attributes
Show child attributes
⌘I