Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Delete collection
if client.collections.exists("my_collection"):
client.collections.delete("my_collection")
print("✓ Collection deleted")
else:
print("Collection does not exist")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
await client.collections.delete('my_collection');
console.log('Deleted collection');
client.close();
curl -X DELETE "http://localhost:6573/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 => "6573",
CURLOPT_URL => "http://localhost:6573/collections/{collection_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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:6573/collections/{collection_name}"
req, _ := http.NewRequest("DELETE", 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.delete("http://localhost:6573/collections/{collection_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6573/collections/{collection_name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.006704791,
"status": "ok",
"result": true
}Collections
Delete collection
Delete a collection and all its data permanently. This operation is irreversible. All vectors, payloads, and indexes will be permanently removed.
DELETE
/
collections
/
{collection_name}
Python
from actian_vectorai_client import VectorAIClient
with VectorAIClient("localhost:6574") as client:
# Delete collection
if client.collections.exists("my_collection"):
client.collections.delete("my_collection")
print("✓ Collection deleted")
else:
print("Collection does not exist")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
await client.collections.delete('my_collection');
console.log('Deleted collection');
client.close();
curl -X DELETE "http://localhost:6573/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 => "6573",
CURLOPT_URL => "http://localhost:6573/collections/{collection_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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:6573/collections/{collection_name}"
req, _ := http.NewRequest("DELETE", 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.delete("http://localhost:6573/collections/{collection_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6573/collections/{collection_name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.006704791,
"status": "ok",
"result": true
}Authorizations
Admin JWT or access token for authenticating requests to VectorAI DB.
Path Parameters
The name of the collection to delete.
Example:
"my_collection"
Query Parameters
The maximum time to wait for the operation to complete, in seconds.
Example:
30