Delete multiple objects from Storage
curl --request DELETE \
--url https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"object_keys": [
"my-file.pdf",
"my-file.doc"
],
"path": [
"pdf/",
"doc/"
]
}
'import requests
url = "https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects"
payload = {
"object_keys": ["my-file.pdf", "my-file.doc"],
"path": ["pdf/", "doc/"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({object_keys: ['my-file.pdf', 'my-file.doc'], path: ['pdf/', 'doc/']})
};
fetch('https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/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://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/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([
'object_keys' => [
'my-file.pdf',
'my-file.doc'
],
'path' => [
'pdf/',
'doc/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects"
payload := strings.NewReader("{\n \"object_keys\": [\n \"my-file.pdf\",\n \"my-file.doc\"\n ],\n \"path\": [\n \"pdf/\",\n \"doc/\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"object_keys\": [\n \"my-file.pdf\",\n \"my-file.doc\"\n ],\n \"path\": [\n \"pdf/\",\n \"doc/\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"object_keys\": [\n \"my-file.pdf\",\n \"my-file.doc\"\n ],\n \"path\": [\n \"pdf/\",\n \"doc/\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"deleted_object_count": 3,
"deleted_objects": [
"my-file.pdf",
"my-file.doc",
"doc/my-file-2.doc"
],
"errors": [
{
"error_code": "404",
"error_message": "Objects not exist in path",
"key": "pdf/"
}
]
},
"exception": null,
"success": true
}{
"code": 400,
"data": null,
"exception": {
"error_code": 400001,
"error_message": "Bad Request: "
},
"success": false
}{
"code": 500,
"data": null,
"exception": {
"error_code": 500001,
"error_message": "Internal error: "
},
"success": false
}스토리지 (Storage)
Delete multiple objects from Storage
Delete multiple objects from the storage by object keys and path.
DELETE
/
v1
/
storage
/
objects
Delete multiple objects from Storage
curl --request DELETE \
--url https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"object_keys": [
"my-file.pdf",
"my-file.doc"
],
"path": [
"pdf/",
"doc/"
]
}
'import requests
url = "https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects"
payload = {
"object_keys": ["my-file.pdf", "my-file.doc"],
"path": ["pdf/", "doc/"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({object_keys: ['my-file.pdf', 'my-file.doc'], path: ['pdf/', 'doc/']})
};
fetch('https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/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://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/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([
'object_keys' => [
'my-file.pdf',
'my-file.doc'
],
'path' => [
'pdf/',
'doc/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects"
payload := strings.NewReader("{\n \"object_keys\": [\n \"my-file.pdf\",\n \"my-file.doc\"\n ],\n \"path\": [\n \"pdf/\",\n \"doc/\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"object_keys\": [\n \"my-file.pdf\",\n \"my-file.doc\"\n ],\n \"path\": [\n \"pdf/\",\n \"doc/\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{resource_uuid}.api.seahorse.dnotitia.ai/v1/storage/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"object_keys\": [\n \"my-file.pdf\",\n \"my-file.doc\"\n ],\n \"path\": [\n \"pdf/\",\n \"doc/\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"deleted_object_count": 3,
"deleted_objects": [
"my-file.pdf",
"my-file.doc",
"doc/my-file-2.doc"
],
"errors": [
{
"error_code": "404",
"error_message": "Objects not exist in path",
"key": "pdf/"
}
]
},
"exception": null,
"success": true
}{
"code": 400,
"data": null,
"exception": {
"error_code": 400001,
"error_message": "Bad Request: "
},
"success": false
}{
"code": 500,
"data": null,
"exception": {
"error_code": 500001,
"error_message": "Internal error: "
},
"success": false
}Authorizations
bearerAuthapiKeyAuth
Bearer token authentication. Include the token in the Authorization header as 'Bearer '
Body
application/json
The objects to delete from storage.