Folders
Restore a folder from trash
Restores a soft-deleted folder. If the folder is not in trash, the endpoint returns HTTP 200 with a message stating so; that is not an error. A folder past the trash window returns 410.
Required scopes: buckets:write + folders:write.
POST
/
folders
/
restore-from-trash
/
{folderId}
Restore a folder from trash
curl --request POST \
--url https://api.everabyte.io/api/folders/restore-from-trash/{folderId} \
--header 'X-Public-Key: <api-key>' \
--header 'X-Secret-Key: <api-key>'const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
fetch('https://api.everabyte.io/api/folders/restore-from-trash/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
fetch('https://api.everabyte.io/api/folders/restore-from-trash/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.everabyte.io/api/folders/restore-from-trash/{folderId}"
headers = {
"X-Public-Key": "<api-key>",
"X-Secret-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everabyte.io/api/folders/restore-from-trash/{folderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Public-Key: <api-key>",
"X-Secret-Key: <api-key>"
],
]);
$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 := "https://api.everabyte.io/api/folders/restore-from-trash/{folderId}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Public-Key", "<api-key>")
req.Header.Add("X-Secret-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": 200,
"message": "Folder restored from trash",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}Authorizations
Public half of the company API key. Format: pk_ followed by 64 hexadecimal characters.
Secret half of the company API key. Format: sk_ followed by 64 hexadecimal characters. Stored as a hash server-side and shown only at creation or rotation.
Path Parameters
Folder identifier.
⌘I
Restore a folder from trash
curl --request POST \
--url https://api.everabyte.io/api/folders/restore-from-trash/{folderId} \
--header 'X-Public-Key: <api-key>' \
--header 'X-Secret-Key: <api-key>'const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
fetch('https://api.everabyte.io/api/folders/restore-from-trash/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
fetch('https://api.everabyte.io/api/folders/restore-from-trash/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.everabyte.io/api/folders/restore-from-trash/{folderId}"
headers = {
"X-Public-Key": "<api-key>",
"X-Secret-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everabyte.io/api/folders/restore-from-trash/{folderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Public-Key: <api-key>",
"X-Secret-Key: <api-key>"
],
]);
$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 := "https://api.everabyte.io/api/folders/restore-from-trash/{folderId}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Public-Key", "<api-key>")
req.Header.Add("X-Secret-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": 200,
"message": "Folder restored from trash",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}