{% extends 'dashboard/base.html' %} {% load humanize %} {% block title %}Usage Analytics - Peza API{% endblock %} {% block breadcrumb %}Usage Analytics{% endblock %} {% block content %}

Usage Analytics

Monitor your API usage, manage keys, and track performance

Current Period
{{ current_month }}

Monthly Usage Overview

Plan: {% if plan %}{{ plan.name }} ({{ limit|intcomma }} requests/mo){% else %}Free (100 requests/mo){% endif %}

Utilization Rate
{{ usage_percentage|floatformat:1 }}%
0 {{ total_usage|default:0|intcomma }} used {{ limit|intcomma }}
{% if usage_percentage >= 90 %}
{% elif usage_percentage >= 70 %}
{% else %}
{% endif %}
Total Requests
{{ total_usage|default:0|intcomma }}
Remaining
{{ remaining|intcomma }}
Monthly Limit
{{ limit|intcomma }}
Reset Date
{% now "d" as current_day %} {{ current_day|add:"1" }} {{ current_month|slice:"-4:" }}

Production Usage

Last 6 months
Production API calls

Testing Usage

Last 6 months
Testing/Playground calls

API Keys Management

Create New Key
{% for key in api_keys %} {% empty %} {% endfor %}
Key Name Type Usage Status Last Used Actions
{{ key.key|slice:":8" }}...{{ key.key|slice:"-4:" }}
Created {{ key.created_at|date:"M d, Y" }}
{{ key.name }}
{% if key.is_testing %} Playground {% else %} Production {% endif %}
{% if key.is_testing %}{{ key.testing_used|default:0 }}{% else %}{{ key.requests_this_month|default:0 }}{% endif %}
{% if key.is_testing %} of {{ key.testing_limit|default:"∞" }} {% else %} of {{ limit|default:100 }} {% endif %}
{% if key.is_active %} Active {% else %} Inactive {% endif %} {% if key.last_used %}
{{ key.last_used|date:"M d, Y" }}
{{ key.last_used|naturaltime }}
{% else %} Never {% endif %}

No API keys found

Create your first API key to get started

{% block extra_js %} {% endblock %} {% endblock %}