Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Get collection information
info = client.collections.get_info("my_collection")
print(f"Collection: {info.config.params.collection_name if info.config else 'my_collection'}")
print(f"Status: {info.status}")
print(f"Points: {info.points_count}")
print(f"Vectors config: {info.config.params.vectors if info.config else 'N/A'}")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const info = await client.collections.getInfo('my_collection');
console.log(`Vectors: ${info.vectorsCount}, Points: ${info.pointsCount}, Segments: ${info.segmentsCount}`);
client.close();curl -X GET "http://localhost:6575/collections/my_collection" \
-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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}")
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.0000054,
"status": "ok",
"result": {
"status": "Green",
"optimizer_status": {
"ok": true,
"error": null
},
"warnings": [],
"indexed_vectors_count": null,
"points_count": 0,
"segments_count": 1,
"config": {
"params": {
"vectors": null,
"shard_number": 0,
"replication_factor": null,
"write_consistency_factor": null,
"on_disk_payload": false
},
"hnsw_config": {
"m": null,
"ef_construct": null,
"full_scan_threshold": null,
"max_indexing_threads": null,
"on_disk": null,
"payload_m": null
},
"optimizer_config": {
"deleted_threshold": null,
"vacuum_min_vector_number": null,
"default_segment_number": null,
"max_segment_size": null,
"memmap_threshold": null,
"indexing_threshold": null,
"flush_interval_sec": null,
"max_optimization_threads": null
},
"wal_config": {
"wal_capacity_mb": null,
"wal_segments_ahead": null
}
},
"payload_schema": {},
"name_ext": "my_collection",
"health_status_ext": "HEALTH_GREEN",
"vectors_count": 0,
"index_type_ext": "INDEX_TYPE_HNSW"
}
}Collections
Get collection info
Get detailed information about a specific collection, including vector configuration, index type and parameters, point count, and collection status.
GET
/
collections
/
{collection_name}
Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Get collection information
info = client.collections.get_info("my_collection")
print(f"Collection: {info.config.params.collection_name if info.config else 'my_collection'}")
print(f"Status: {info.status}")
print(f"Points: {info.points_count}")
print(f"Vectors config: {info.config.params.vectors if info.config else 'N/A'}")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const info = await client.collections.getInfo('my_collection');
console.log(`Vectors: ${info.vectorsCount}, Points: ${info.pointsCount}, Segments: ${info.segmentsCount}`);
client.close();curl -X GET "http://localhost:6575/collections/my_collection" \
-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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}")
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.0000054,
"status": "ok",
"result": {
"status": "Green",
"optimizer_status": {
"ok": true,
"error": null
},
"warnings": [],
"indexed_vectors_count": null,
"points_count": 0,
"segments_count": 1,
"config": {
"params": {
"vectors": null,
"shard_number": 0,
"replication_factor": null,
"write_consistency_factor": null,
"on_disk_payload": false
},
"hnsw_config": {
"m": null,
"ef_construct": null,
"full_scan_threshold": null,
"max_indexing_threads": null,
"on_disk": null,
"payload_m": null
},
"optimizer_config": {
"deleted_threshold": null,
"vacuum_min_vector_number": null,
"default_segment_number": null,
"max_segment_size": null,
"memmap_threshold": null,
"indexing_threshold": null,
"flush_interval_sec": null,
"max_optimization_threads": null
},
"wal_config": {
"wal_capacity_mb": null,
"wal_segments_ahead": null
}
},
"payload_schema": {},
"name_ext": "my_collection",
"health_status_ext": "HEALTH_GREEN",
"vectors_count": 0,
"index_type_ext": "INDEX_TYPE_HNSW"
}
}Authorizations
Admin JWT or access token for authenticating requests to VectorAI DB.
Path Parameters
The name of the collection to retrieve information for.
Example:
"my_collection"
⌘I