Resource Endpoints
The resource quota endpoints manage tenant resource limits and usage tracking. Quotas are enforced per resource type with configurable soft and hard limits. Served by ResourceQuotaController at /api/v1/tenants/:tenantId/quotas.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | .../quotas/defaults | Create default quotas for tier |
| POST | .../quotas | Create or update a quota |
| GET | .../quotas | Get all quotas |
| GET | .../quotas/:resourceType | Get specific quota |
| GET | .../quotas/summary | Get quota summary with usage |
| POST | .../quotas/usage | Record resource usage |
| GET | .../quotas/:resourceType/check | Check quota availability |
| GET | .../quotas/:resourceType/usage/history | Get usage history |
| GET | .../quotas/:resourceType/usage/trend | Get usage trend data |
Resource Types
| Type | Description |
|---|---|
CPU | CPU cores allocation |
MEMORY | Memory in GB |
STORAGE | Storage in GB |
USERS | Maximum user accounts |
API_CALLS | API call count per period |
QUERIES | Query execution count per period |
DASHBOARDS | Maximum dashboard count |
DATA_SOURCES | Maximum data source connections |
Recording Usage
POST .../quotas/usage{
"resourceType": "API_CALLS",
"amount": 1,
"metadata": {
"endpoint": "/v1/queries/execute",
"source": "bi-workbench"
}
}| Status | Description |
|---|---|
| 200 | Usage recorded, within limits |
| 403 | Hard quota exceeded, request rejected |
The response includes accepted, currentUsage, quotaLimit, and utilizationPercent.
Usage Trends
GET .../quotas/API_CALLS/usage/trend?interval=day&start=2026-01-01T00:00:00Z| Parameter | Type | Default | Description |
|---|---|---|---|
interval | string | day | Aggregation interval: hour, day, week |
start | Instant | 30 days ago | Start of the trend period |
end | Instant | Now | End of the trend period |