Delete Many Blob Objects or a Folder
curl --request DELETE \
--url https://blob.vertracloud.app/v1/objects \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
],
"prefix": "<string>"
}
'import requests
url = "https://blob.vertracloud.app/v1/objects"
payload = {
"ids": ["<string>"],
"prefix": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>'], prefix: '<string>'})
};
fetch('https://blob.vertracloud.app/v1/objects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://blob.vertracloud.app/v1/objects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
],
'prefix' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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 := "https://blob.vertracloud.app/v1/objects"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"prefix\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://blob.vertracloud.app/v1/objects")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ],\n \"prefix\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ],\n \"prefix\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"deleted": [
"0b6f7c1e-3d2a-4f5b-9a8c-1d2e3f4a5b6c"
],
"not_found": [],
"remaining": false
}
}
Objects
Delete Many Blob Objects or a Folder
Deletes up to 1,000 blob objects by ID, or everything under a folder prefix. Returns what was deleted.
DELETE
/
v1
/
objects
Delete Many Blob Objects or a Folder
curl --request DELETE \
--url https://blob.vertracloud.app/v1/objects \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
],
"prefix": "<string>"
}
'import requests
url = "https://blob.vertracloud.app/v1/objects"
payload = {
"ids": ["<string>"],
"prefix": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>'], prefix: '<string>'})
};
fetch('https://blob.vertracloud.app/v1/objects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://blob.vertracloud.app/v1/objects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
],
'prefix' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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 := "https://blob.vertracloud.app/v1/objects"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"prefix\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://blob.vertracloud.app/v1/objects")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ],\n \"prefix\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ],\n \"prefix\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"deleted": [
"0b6f7c1e-3d2a-4f5b-9a8c-1d2e3f4a5b6c"
],
"not_found": [],
"remaining": false
}
}
Deletes up to 1,000 objects in one call, either by
ids or by folder prefix. Send exactly one of them. Deletion is permanent. When more objects match a prefix, remaining is true; call again until it is false.
Scope: blob:write.
string[]
Object IDs, up to 1,000. Don’t send it together with
prefix.string
Delete every object whose path starts with this folder prefix, up to 1,000 per call. Don’t send it together with
ids.string
The workspace ID, when the blob belongs to a workspace. The call acts on the blob of the workspace owner and needs the
blob:read workspace permission (blob:manage on routes that change data). Leave it out to act on your own blob.Example request
curl -X DELETE "https://blob.vertracloud.app/v1/objects" \
-H "Authorization: Bearer $VERTRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prefix":"tmp/"}'
Response
object
{
"response": {
"deleted": [
"0b6f7c1e-3d2a-4f5b-9a8c-1d2e3f4a5b6c"
],
"not_found": [],
"remaining": false
}
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
AUTH_TOKEN_MISSING(401): NoAuthorizationheader was sent.API_KEY_INVALID(401): The API key doesn’t exist, was revoked, or its secret doesn’t match.API_KEY_SCOPE_DENIED(403): The key lacks the scope this route needs (blob:readorblob:write);details.requirednames it.WORKSPACE_PERMISSION_DENIED(403): Only withworkspace_id: you’re not a member, or your role lacks the blob permission.WORKSPACE_NOT_FOUND(404): Only withworkspace_id: no workspace with that ID, or you’re not a member.VALIDATION_ERROR(400): A parameter or body field failed validation.details.pathnames the field.
{
"code": "AUTH_TOKEN_MISSING"
}
{
"code": "API_KEY_SCOPE_DENIED"
}
{
"code": "WORKSPACE_NOT_FOUND"
}
{
"code": "VALIDATION_ERROR"
}