This chapter covers the core features and capabilities of API Rate Controller.
X-RateLimit-* headers for every responseFollow this guide to get API Rate Controller up and running in your environment.
python src/main.py --init-demo# Check rate limit status for a tenant
curl http://localhost:8009/api/limits/tenant_acme
# Simulate an API request (consumes 1 unit)
curl -X POST http://localhost:8009/api/check \
-H "Content-Type: application/json" \
-d '{"tenant_id": "tenant_acme", "endpoint": "/api/data", "cost": 1}'
# Get quota status
curl http://localhost:8009/api/quota/tenant_acme
# View rate limit analytics
curl http://localhost:8009/api/analytics/tenant_acme
# Manage plans
curl http://localhost:8009/api/plans
# Create a custom plan
curl -X POST http://localhost:8009/api/plans \
-H "Content-Type: application/json" \
-d '{"name": "custom", "requests_per_second": 50, "requests_per_minute": 2000, "requests_per_hour": 50000, "daily_quota": 500000}'
# Assign plan to tenant
curl -X PUT http://localhost:8009/api/tenants/tenant_acme/plan \
-H "Content-Type: application/json" \
-d '{"plan_id": "custom"}'| Method | Path | Description |
|---|---|---|
| POST | /api/check | Check rate limit and consume quota |
| GET | /api/limits/:tenant_id | Get current rate limit status |
| GET | /api/quota/:tenant_id | Get quota status (daily/monthly) |
| GET | /api/analytics/:tenant_id | Get rate limit analytics |
| GET | /api/plans | List all plans |
| POST | /api/plans | Create a new plan |
| PUT | /api/tenants/:tenant_id/plan | Assign plan to tenant |
| POST | /api/reset/:tenant_id | Reset rate limit counters |
Get the full API Rate Controller 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.