Get Workspace Storage Usage (v1)
Get storage usage summary for a workspace.
Method & Path
GET /v1/admin/workspaces/:workspaceId/storage/usage
Description
Retrieves storage usage statistics for a specific workspace, including total storage used and breakdown by resource type.
Authentication
Required: Admin authentication with businesses.manage permission.
Include the admin JWT token in the Authorization header:
Authorization: Bearer <admin_token>
Headers
Authorization: Bearer <admin_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | The workspace ID |
Query Parameters
None.
Request Body
None.
Response 200 OK
{
"workspaceId": "507f1f77bcf86cd799439011",
"totalBytes": 104857600,
"totalMB": 100,
"breakdown": {
"avatars": 5242880,
"attachments": 52428800,
"storefront": 47185920
}
}
Common Errors
- 401 Unauthorized: Missing or invalid admin authentication token
- 403 Forbidden: Insufficient permissions (missing
businesses.managepermission) - 404 Not Found: Workspace not found
- 400 Bad Request: Invalid workspace ID format
- 500 Internal Server Error: Server error