curl "https://app.drime.cloud/api/v1/user/space-usage?workspaceId=0" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch(
'https://app.drime.cloud/api/v1/user/space-usage?workspaceId=0',
{
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
const { used, available } = await response.json();
// Convert to GB
const usedGB = (used / 1024 / 1024 / 1024).toFixed(2);
const availableGB = (available / 1024 / 1024 / 1024).toFixed(2);
console.log(`Used: ${usedGB} GB / Available: ${availableGB} GB`);
import requests
response = requests.get(
'https://app.drime.cloud/api/v1/user/space-usage',
params={'workspaceId': 0},
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
used_gb = data['used'] / 1024 / 1024 / 1024
available_gb = data['available'] / 1024 / 1024 / 1024
print(f"Used: {used_gb:.2f} GB / Available: {available_gb:.2f} GB")
{
"used": 120042057597,
"available": 6597069766656,
"status": "success"
}
User & Workspaces
Get Space Usage
Get storage space usage for the current user or workspace
GET
/
user
/
space-usage
curl "https://app.drime.cloud/api/v1/user/space-usage?workspaceId=0" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch(
'https://app.drime.cloud/api/v1/user/space-usage?workspaceId=0',
{
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
const { used, available } = await response.json();
// Convert to GB
const usedGB = (used / 1024 / 1024 / 1024).toFixed(2);
const availableGB = (available / 1024 / 1024 / 1024).toFixed(2);
console.log(`Used: ${usedGB} GB / Available: ${availableGB} GB`);
import requests
response = requests.get(
'https://app.drime.cloud/api/v1/user/space-usage',
params={'workspaceId': 0},
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
used_gb = data['used'] / 1024 / 1024 / 1024
available_gb = data['available'] / 1024 / 1024 / 1024
print(f"Used: {used_gb:.2f} GB / Available: {available_gb:.2f} GB")
{
"used": 120042057597,
"available": 6597069766656,
"status": "success"
}
Overview
Returns the current storage usage and available space for a user or workspace.Query Parameters
integer
Workspace ID. Use
0 for the user’s default personal workspace.Response
integer
Total space used in bytes
integer
Available space in bytes
string
Request status (
success)curl "https://app.drime.cloud/api/v1/user/space-usage?workspaceId=0" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch(
'https://app.drime.cloud/api/v1/user/space-usage?workspaceId=0',
{
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
const { used, available } = await response.json();
// Convert to GB
const usedGB = (used / 1024 / 1024 / 1024).toFixed(2);
const availableGB = (available / 1024 / 1024 / 1024).toFixed(2);
console.log(`Used: ${usedGB} GB / Available: ${availableGB} GB`);
import requests
response = requests.get(
'https://app.drime.cloud/api/v1/user/space-usage',
params={'workspaceId': 0},
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
used_gb = data['used'] / 1024 / 1024 / 1024
available_gb = data['available'] / 1024 / 1024 / 1024
print(f"Used: {used_gb:.2f} GB / Available: {available_gb:.2f} GB")
{
"used": 120042057597,
"available": 6597069766656,
"status": "success"
}
The values are in bytes. To convert to GB, divide by
1024 * 1024 * 1024.⌘I

