Skip to content

Stats

Get overview statistics about your ZIRI instance.

Get Overview Stats

Get high-level statistics.

Endpoint

GET /api/stats/overview

Example Request

curl -H "Authorization: Bearer your-token" \
  http://localhost:3100/api/stats/overview

Success Response

{
	"totalRequests": 12345,
	"permitCount": 12000,
	"forbidCount": 345,
	"totalCost": 1234.56
}

Response Fields

  • totalRequests - Total number of requests processed
  • permitCount - Number of allowed requests
  • forbidCount - Number of denied requests
  • totalCost - Total cost across all requests

Error Responses

Stats Error

{
	"error": "Failed to get overview statistics",
	"code": "STATS_ERROR"
}

Status: 500

Use Cases

  • Dashboard - Display key metrics
  • Monitoring - Quick health check
  • Reporting - High-level summaries

Next Steps