List Media Assets
curl --request GET \
--url https://api.dreep.cloud/api/v1/media \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreep.cloud/api/v1/media"
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/media', 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/media",
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/media"
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/media")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreep.cloud/api/v1/media")
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{
"assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "hero.webp",
"url": "https://cdn.dreep.cloud/api/v1/fetch/2f928a3f-1d2a-4a2b",
"type": "image/webp",
"sizeBytes": "56696",
"assetType": "image",
"folder": "avatars/2024/q1",
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 127
}
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}Media
List Media Assets
GET
/
api
/
v1
/
media
List Media Assets
curl --request GET \
--url https://api.dreep.cloud/api/v1/media \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreep.cloud/api/v1/media"
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/media', 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/media",
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/media"
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/media")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreep.cloud/api/v1/media")
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{
"assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "hero.webp",
"url": "https://cdn.dreep.cloud/api/v1/fetch/2f928a3f-1d2a-4a2b",
"type": "image/webp",
"sizeBytes": "56696",
"assetType": "image",
"folder": "avatars/2024/q1",
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 127
}
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}Returns every ready asset in the project, newest first. Uploads still waiting
on confirm are excluded.
An unknown
Filtering by folder
Passfolder (a path) or folderId (a UUID) to scope the listing to one
folder. Add recursive=true to include everything nested beneath it.
Just this folder
curl "https://api.dreep.cloud/api/v1/media?folder=avatars/2024" \
-H "Authorization: Bearer drp_live_xxxxx"
This folder and all subfolders
curl "https://api.dreep.cloud/api/v1/media?folder=avatars&recursive=true" \
-H "Authorization: Bearer drp_live_xxxxx"
folder path returns 400 rather than an empty list, so a typo
doesn’t look like an empty folder. See
Folders & Paths.
Each asset comes back with its folder path already resolved, so you don’t
need a second call to turn folderId into something readable.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Only list assets in this folder path (relative to the project root). The path must already exist. Mutually exclusive with folderId.
Example:
"avatars/2024"
UUID of the folder to list. Mutually exclusive with folder.
With folder or folderId, also include assets in every subfolder beneath it. Ignored when no folder filter is given.
Available options:
true, false