Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Get multiple points by ID
points = client.points.get("my_collection", ids=[1, 5, 10, 100], with_payload=True, with_vectors=True)
for p in points:
print(f"ID: {p.id}")
print(f"Payload: {p.payload}")
print(f"Vector: {p.vectors[:3]}...") # First 3 dimensionsimport { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const points = await client.points.get('my_collection', [1, 2, 3]);
for (const p of points) {
console.log(`id=${p.id} payload=${JSON.stringify(p.payload)}`);
}
client.close();curl -X POST "http://localhost:6575/collections/my_collection/points" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>' \
-d '{
"ids": [1, 2, 3],
"with_payload": true,
"with_vectors": true
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
1,
2,
3
],
'with_payload' => true,
'with_vectors' => true
]),
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 := strings.NewReader("{\n \"ids\": [\n 1,\n 2,\n 3\n ],\n \"with_payload\": true,\n \"with_vectors\": true\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:6575/collections/{collection_name}/points")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n 1,\n 2,\n 3\n ],\n \"with_payload\": true,\n \"with_vectors\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n 1,\n 2,\n 3\n ],\n \"with_payload\": true,\n \"with_vectors\": true\n}"
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.000159851,
"status": "ok",
"result": [
{
"id": 1,
"payload": "{\"category\":\"electronics\",\"price\":299.99}",
"vector": null
},
{
"id": 2,
"payload": "{\"category\":\"books\",\"price\":19.99}",
"vector": null
},
{
"id": 3,
"payload": "{\"category\":\"electronics\",\"price\":149.99}",
"vector": null
}
]
}{
"status": {
"error": "Collection `my_collection` doesn't exist!"
},
"time": 123
}Points
Get points by IDs
Retrieve multiple points by their IDs. Returns the matching points with their vectors and payloads based on the request parameters.
POST
/
collections
/
{collection_name}
/
points
Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Get multiple points by ID
points = client.points.get("my_collection", ids=[1, 5, 10, 100], with_payload=True, with_vectors=True)
for p in points:
print(f"ID: {p.id}")
print(f"Payload: {p.payload}")
print(f"Vector: {p.vectors[:3]}...") # First 3 dimensionsimport { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const points = await client.points.get('my_collection', [1, 2, 3]);
for (const p of points) {
console.log(`id=${p.id} payload=${JSON.stringify(p.payload)}`);
}
client.close();curl -X POST "http://localhost:6575/collections/my_collection/points" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>' \
-d '{
"ids": [1, 2, 3],
"with_payload": true,
"with_vectors": true
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
1,
2,
3
],
'with_payload' => true,
'with_vectors' => true
]),
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 := strings.NewReader("{\n \"ids\": [\n 1,\n 2,\n 3\n ],\n \"with_payload\": true,\n \"with_vectors\": true\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:6575/collections/{collection_name}/points")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n 1,\n 2,\n 3\n ],\n \"with_payload\": true,\n \"with_vectors\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n 1,\n 2,\n 3\n ],\n \"with_payload\": true,\n \"with_vectors\": true\n}"
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.000159851,
"status": "ok",
"result": [
{
"id": 1,
"payload": "{\"category\":\"electronics\",\"price\":299.99}",
"vector": null
},
{
"id": 2,
"payload": "{\"category\":\"books\",\"price\":19.99}",
"vector": null
},
{
"id": 3,
"payload": "{\"category\":\"electronics\",\"price\":149.99}",
"vector": null
}
]
}{
"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 to retrieve points from.
Example:
"my_collection"
Body
application/json
Response
Points retrieved
⌘I