Get Workspace Usage
GET/api/v1/workspaces/usage
Get current period usage metrics for billing.
Returns aggregated usage for the current day (midnight to now). Usage is calculated hourly and includes:
- Location events (DeviceLocation records)
- Action deliveries (successful webhook deliveries)
- Event units (locations + 0.5 * actions)
Event Units Calculation (PRD §7):
- 1 location event = 1 event unit
- 1 action delivery = 0.5 event units
Tier Limits (PRD §7):
- Developer: 500,000 event units/month
- Pro: 5,000,000 event units/month
- Enterprise: Unlimited
Example Response:
{
"location_events": 10000,
"action_deliveries": 5000,
"event_units": 12500,
"tier": "developer",
"tier_limit": 500000,
"period_start": "2025-10-01T00:00:00Z",
"period_end": "2025-10-01T23:59:59Z"
}
PRD Reference: §7 Pricing & Packaging Roadmap: Phase 2, Task 2.3
Request
Responses
- 200
- 404
OK
Not Found