List Folders
curl --request GET \
--url https://api.dreep.cloud/api/v1/folders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreep.cloud/api/v1/folders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dreep.cloud/api/v1/folders', 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://api.dreep.cloud/api/v1/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.dreep.cloud/api/v1/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dreep.cloud/api/v1/folders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreep.cloud/api/v1/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"folders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"path": "avatars/2024/q1",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accessControlType": "public"
}
],
"currentFolder": {}
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}Folders
List Folders
Lists folders. With no parameters this returns every folder in the project, at any depth — each one carrying its full path, so you can build the whole tree from a single call. Pass path to list the direct children of one folder, or parentId=null for root folders only.
GET
/
api
/
v1
/
folders
List Folders
curl --request GET \
--url https://api.dreep.cloud/api/v1/folders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreep.cloud/api/v1/folders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dreep.cloud/api/v1/folders', 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://api.dreep.cloud/api/v1/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.dreep.cloud/api/v1/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dreep.cloud/api/v1/folders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreep.cloud/api/v1/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"folders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"path": "avatars/2024/q1",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accessControlType": "public"
}
],
"currentFolder": {}
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}With no parameters this returns every folder in the project, at any depth.
Each one carries its full
To walk the tree one level at a time, the way a file browser does, pass
Every folder includes its full
path, so one call is enough to build the whole tree.
Every folder
curl "https://api.dreep.cloud/api/v1/folders" \
-H "Authorization: Bearer drp_live_xxxxx"
path
(or parentId=null for the root level):
Direct children of avatars/2024
curl "https://api.dreep.cloud/api/v1/folders?path=avatars/2024" \
-H "Authorization: Bearer drp_live_xxxxx"
Root folders only
curl "https://api.dreep.cloud/api/v1/folders?parentId=null" \
-H "Authorization: Bearer drp_live_xxxxx"
path from the project root, so you can link
straight to it or reuse it as the folder value on an upload.
A path that names no folder returns an empty folders array with
currentFolder: null. See Folders & Paths.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
List the children of this folder path (relative to the project root). An unknown path returns an empty list.
Example:
"avatars/2024"
List the children of this folder UUID. Pass the literal null to list root folders explicitly.