# 📈 Get usage metrics for a company Get detailed usage metrics for a company within a specified period. Endpoint: GET /usage/metrics Version: 1.0.0 ## Query parameters: - `period` (string) Period for usage metrics Enum: "daily", "weekly", "monthly", "yearly" - `start_date` (any) Start date for custom period - `end_date` (any) End date for custom period ## Header parameters: - `X-PDP-Client-Id` (string, required) ID of the PDP Client for which the operation is performed ## Response 200 fields (application/json): - `company_id` (string, required) - `period` (string, required) Enum: "daily", "weekly", "monthly", "yearly" - `start_date` (string, required) - `end_date` (string, required) - `total_api_calls` (integer, required) Total number of API calls - `total_successful_calls` (integer, required) Total successful API calls - `total_failed_calls` (integer, required) Total failed API calls - `success_rate` (number, required) Success rate percentage - `endpoint_usage` (array, required) Usage breakdown by endpoint - `endpoint_usage.endpoint` (string, required) API endpoint path - `endpoint_usage.method` (string, required) HTTP method - `endpoint_usage.call_count` (integer, required) Number of calls made - `endpoint_usage.success_count` (integer, required) Number of successful calls (2xx status) - `endpoint_usage.error_count` (integer, required) Number of failed calls (4xx/5xx status) - `endpoint_usage.avg_response_time_ms` (number, required) Average response time in milliseconds - `generated_at` (string) ## Response 401 fields (application/json): - `error` (string, required) - `code` (integer, required) - `trace_id` (string, required) ## Response 422 fields (application/json): - `detail` (array) - `detail.loc` (array, required) - `detail.msg` (string, required) - `detail.type` (string, required) ## Response 403 fields ## Response 404 fields