Folders
Update a folder
Renames a folder or moves it under another parent. parentId: null moves the folder to the bucket root. The body schema is strict: unknown keys are rejected.
Required scopes: buckets:write + folders:write.
PUT
/
folders
/
update
/
{folderId}
Update a folder
curl --request PUT \
--url https://api.everabyte.io/api/folders/update/{folderId} \
--header 'Content-Type: application/json' \
--header 'X-Public-Key: <api-key>' \
--header 'X-Secret-Key: <api-key>' \
--data '
{
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PUT',
headers: {
'X-Public-Key': '<api-key>',
'X-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.everabyte.io/api/folders/update/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {
'X-Public-Key': '<api-key>',
'X-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.everabyte.io/api/folders/update/{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/update/{folderId}"
payload = {
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Public-Key": "<api-key>",
"X-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everabyte.io/api/folders/update/{folderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'parentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.everabyte.io/api/folders/update/{folderId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"parentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Public-Key", "<api-key>")
req.Header.Add("X-Secret-Key", "<api-key>")
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))
}{
"status": 200,
"message": "Folder updated",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bucketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"totalFiles": 123,
"totalSubfolders": 123,
"totalSizeByte": 123
}
}{
"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.
Body
application/json
⌘I
Update a folder
curl --request PUT \
--url https://api.everabyte.io/api/folders/update/{folderId} \
--header 'Content-Type: application/json' \
--header 'X-Public-Key: <api-key>' \
--header 'X-Secret-Key: <api-key>' \
--data '
{
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PUT',
headers: {
'X-Public-Key': '<api-key>',
'X-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.everabyte.io/api/folders/update/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {
'X-Public-Key': '<api-key>',
'X-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.everabyte.io/api/folders/update/{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/update/{folderId}"
payload = {
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Public-Key": "<api-key>",
"X-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everabyte.io/api/folders/update/{folderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'parentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.everabyte.io/api/folders/update/{folderId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"parentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Public-Key", "<api-key>")
req.Header.Add("X-Secret-Key", "<api-key>")
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))
}{
"status": 200,
"message": "Folder updated",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bucketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"totalFiles": 123,
"totalSubfolders": 123,
"totalSizeByte": 123
}
}{
"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": {}
}