Get Storage Summary (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/storage/summary
Description
Get optimized storage summary without file details. This endpoint is faster than getting full file lists.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Response 200 OK
{
"totalSizeBytes": 524288000,
"totalSizeMB": 500,
"totalSizeGB": 0.49,
"quotaBytes": 1073741824,
"quotaMB": 1024,
"quotaGB": 1,
"usagePercentage": 48.83,
"byCategory": {
"sessions": 200000000,
"storefront": 150000000,
"vcard": 100000000,
"financial": 50000000,
"sms": 10000000,
"ai-tools": 5000000,
"other": 9280000
}
}
Response Fields
totalSizeBytes(number): Total storage used in bytestotalSizeMB(number): Total storage used in megabytestotalSizeGB(number): Total storage used in gigabytesquotaBytes(number): Storage quota in bytesquotaMB(number): Storage quota in megabytesquotaGB(number): Storage quota in gigabytesusagePercentage(number): Usage percentage (0-100)byCategory(object): Storage usage grouped by category
Common Errors
401 Unauthorized: Missing or invalid authentication token
404 Not Found: Workspace not found
500 Internal Server Error: Server error occurred while processing the request