Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# List all collections
collections = client.collections.list()
print(f"Found {len(collections)} collections:")
for name in collections:
print(f" • {name}")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const collections = await client.collections.list();
console.log(`Found ${collections.length} collections:`, collections);
client.close();curl -X GET "http://localhost:6575/collections" \
-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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections")
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.000150269,
"status": "ok",
"result": {
"collections": [
{
"name": "my_hnsw_collection"
},
{
"name": "my_collection"
}
]
}
}{
"status": {
"error": "<string>"
},
"time": 123
}Collections
List all collections
Get a list of all existing collection names in the database. Use GET /collections/{collection_name} to get detailed information about a specific collection.
GET
/
collections
Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# List all collections
collections = client.collections.list()
print(f"Found {len(collections)} collections:")
for name in collections:
print(f" • {name}")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
const collections = await client.collections.list();
console.log(`Found ${collections.length} collections:`, collections);
client.close();curl -X GET "http://localhost:6575/collections" \
-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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections")
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.000150269,
"status": "ok",
"result": {
"collections": [
{
"name": "my_hnsw_collection"
},
{
"name": "my_collection"
}
]
}
}{
"status": {
"error": "<string>"
},
"time": 123
}Authorizations
Admin JWT or access token for authenticating requests to VectorAI DB.
⌘I