This chapter covers the core features and capabilities of Usage Metering.
Follow this guide to get Usage Metering up and running in your environment.
python src/main.py --init-demo# Record usage
curl -X POST http://localhost:8005/api/events \
-H "Content-Type: application/json" \
-d '{"tenant_id": "tenant_acme", "metric": "api_calls", "quantity": 1, "user_id": "user_1"}'
# Check usage
curl http://localhost:8005/api/usage/tenant_acme/api_calls
# Check quota
curl http://localhost:8005/api/quota/tenant_acme/api_calls
# Generate billing report
curl -X POST http://localhost:8005/api/billing-report \
-H "Content-Type: application/json" \
-d '{"tenant_id": "tenant_acme"}'| Method | Path | Description |
|---|---|---|
| POST | /api/events | Record a usage event |
| GET | /api/usage/:tenant/:metric | Get usage summary |
| GET | /api/quota/:tenant/:metric | Check quota status |
| POST | /api/billing-report | Generate billing report |
Get the full Usage Metering and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.