Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Get single point by ID
points = client.points.get("my_collection", ids=[1])
point = points[0]
print(f"ID: {point.id}")
print(f"Vector: {point.vectors}")
print(f"Payload: {point.payload}")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const points = await client.points.get('my_collection', [1]);
const point = points[0];
console.log(`id=${point.id} vector=${point.vectors} payload=${JSON.stringify(point.payload)}`);
client.close();curl -X GET "http://localhost:6575/collections/my_collection/points/1" \
-H "Accept: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:6575/collections/{collection_name}/points/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:6575/collections/{collection_name}/points/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.000161149,
"status": "ok",
"result": {
"id": 1,
"payload": "{\"category\":\"electronics\",\"price\":299.99}",
"vector": "[0.10000000149011612,0.20000000298023224,0.30000001192092896,0.4000000059604645]"
}
}{
"status": {
"error": "Collection `my_collection` doesn't exist!"
},
"time": 123
}Points
Get single point
Retrieve full information for a single point by its ID, including its vector and payload.
GET
/
collections
/
{collection_name}
/
points
/
{id}
Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Get single point by ID
points = client.points.get("my_collection", ids=[1])
point = points[0]
print(f"ID: {point.id}")
print(f"Vector: {point.vectors}")
print(f"Payload: {point.payload}")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const points = await client.points.get('my_collection', [1]);
const point = points[0];
console.log(`id=${point.id} vector=${point.vectors} payload=${JSON.stringify(point.payload)}`);
client.close();curl -X GET "http://localhost:6575/collections/my_collection/points/1" \
-H "Accept: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:6575/collections/{collection_name}/points/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:6575/collections/{collection_name}/points/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.000161149,
"status": "ok",
"result": {
"id": 1,
"payload": "{\"category\":\"electronics\",\"price\":299.99}",
"vector": "[0.10000000149011612,0.20000000298023224,0.30000001192092896,0.4000000059604645]"
}
}{
"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 point.
The unique identifier of the point to retrieve. Accepts an integer or a UUID string.
Response
Point retrieved
⌘I