API reference
Delete vectors by ID
Delete one or more vectors from the collection by their user-provided string IDs. IDs that do not exist are silently ignored.
Supports both binary protobuf (application/protobuf) and ProtoJSON
(application/protobuf+json) request bodies.
POST
/
api
/
v1
/
vector
/
delete
Delete vectors by ID
curl --request POST \
--url http://localhost:8080/api/v1/vector/delete \
--header 'Content-Type: application/protobuf+json' \
--data '
{
"ids": [
"<string>"
]
}
'import requests
url = "http://localhost:8080/api/v1/vector/delete"
payload = { "ids": ["<string>"] }
headers = {"Content-Type": "application/protobuf+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/protobuf+json'},
body: JSON.stringify({ids: ['<string>']})
};
fetch('http://localhost:8080/api/v1/vector/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/vector/delete",
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' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/protobuf+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:8080/api/v1/vector/delete"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/protobuf+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:8080/api/v1/vector/delete")
.header("Content-Type", "application/protobuf+json")
.body("{\n \"ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/vector/delete")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/protobuf+json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"vectorsDeleted": 2
}{
"status": "error",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}Body
application/protobuf+jsonapplication/protobuf
Request body for deleting vectors by ID.
User-provided IDs of the vectors to delete (up to 64 bytes each).
Maximum string length:
64⌘I
Delete vectors by ID
curl --request POST \
--url http://localhost:8080/api/v1/vector/delete \
--header 'Content-Type: application/protobuf+json' \
--data '
{
"ids": [
"<string>"
]
}
'import requests
url = "http://localhost:8080/api/v1/vector/delete"
payload = { "ids": ["<string>"] }
headers = {"Content-Type": "application/protobuf+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/protobuf+json'},
body: JSON.stringify({ids: ['<string>']})
};
fetch('http://localhost:8080/api/v1/vector/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/vector/delete",
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' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/protobuf+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:8080/api/v1/vector/delete"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/protobuf+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:8080/api/v1/vector/delete")
.header("Content-Type", "application/protobuf+json")
.body("{\n \"ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/vector/delete")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/protobuf+json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"vectorsDeleted": 2
}{
"status": "error",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}