curl https://better-dodo-20522-us1-vector.upstash.io/delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '["id11", "id12", "abcde"]'
const url = "https://better-dodo-20522-us1-vector.upstash.io/delete"; // Replace with your index endpoint.
const token = "YOUR_TOKEN"; // Replace with your actual token
const data = {
ids: ["1", "2", "abcde"],
};
fetch(url, {
method: "DELETE",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
import requests
import json
url = 'https://better-dodo-20522-us1-vector.upstash.io/delete' # Replace with your index endpoint.
token = 'YOUR_TOKEN' # Replace with your actual token
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
data = {
'ids': ["1", "2", "abcde"],
}
response = requests.delete(url, headers=headers, data=json.dumps(data))
print(response.json())
{
"result" : {
"deleted" : 2
}
}
Endpoints
Delete Vectors
This endpoint deletes the vectors with given IDs.
DELETE
/
delete
curl https://better-dodo-20522-us1-vector.upstash.io/delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '["id11", "id12", "abcde"]'
const url = "https://better-dodo-20522-us1-vector.upstash.io/delete"; // Replace with your index endpoint.
const token = "YOUR_TOKEN"; // Replace with your actual token
const data = {
ids: ["1", "2", "abcde"],
};
fetch(url, {
method: "DELETE",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
import requests
import json
url = 'https://better-dodo-20522-us1-vector.upstash.io/delete' # Replace with your index endpoint.
token = 'YOUR_TOKEN' # Replace with your actual token
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
data = {
'ids': ["1", "2", "abcde"],
}
response = requests.delete(url, headers=headers, data=json.dumps(data))
print(response.json())
{
"result" : {
"deleted" : 2
}
}
Request
You can either upsert a single vector, or multiple vectors in a array.The IDs of the vectors to be deleted.
Response
The count of the successfully deleted vectors.
curl https://better-dodo-20522-us1-vector.upstash.io/delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '["id11", "id12", "abcde"]'
const url = "https://better-dodo-20522-us1-vector.upstash.io/delete"; // Replace with your index endpoint.
const token = "YOUR_TOKEN"; // Replace with your actual token
const data = {
ids: ["1", "2", "abcde"],
};
fetch(url, {
method: "DELETE",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
import requests
import json
url = 'https://better-dodo-20522-us1-vector.upstash.io/delete' # Replace with your index endpoint.
token = 'YOUR_TOKEN' # Replace with your actual token
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
data = {
'ids': ["1", "2", "abcde"],
}
response = requests.delete(url, headers=headers, data=json.dumps(data))
print(response.json())
{
"result" : {
"deleted" : 2
}
}
Was this page helpful?
⌘I