# Better visibility into your API usage: Introducing Usage Quotas and improved Usage Statistics

We're introducing a new way to monitor API consumption in the Husqvarna Developer Portal. Alongside the existing usage statistics, you can now view real-time usage quotas for your applications, making it easier to understand both historical usage trends and your current quota status.

## What's new?

The **Application Details** page now provides two complementary views of API consumption:

- **Application Usage** – historical API usage visualized over time.
- **Usage Quota** – real-time quota consumption and rate limit status for each connected API.

Although both relate to API usage, they serve different purposes.

Use **Application Usage** to understand how your application has been using an API over time. Use **Usage Quota** to see how close your application is to its configured limits right now.

## Application Usage: Historical trends at a glance

The Application Usage chart provides historical statistics for API requests made by your application.

You can switch between:

- Week
- Month
- Year

to analyze usage over different time periods.

### Improved time ranges

As part of this release, we've updated how usage statistics are calculated and displayed.

Previously, the chart displayed data for the current calendar period:

- **Week** showed the current calendar week.
- **Month** showed the current calendar month.
- **Year** showed the current calendar year.

This often resulted in incomplete charts, especially at the beginning of a week, month, or year.

For example, if today was Wednesday, March 10, the Week view would only include Monday through Wednesday instead of showing a full week's worth of activity.

### Rolling lookback periods

The chart now uses rolling time periods instead:

- **Week** displays the last 7 days.
- **Month** displays the last 30 days.
- **Year** displays the last 12 months.

This means that if today is March 10:

- Week shows activity from approximately March 3 through March 10.
- Month shows approximately February 10 through March 10.
- Year shows the last 12 months rather than only the current calendar year.

The buttons are still labeled **Week**, **Month**, and **Year**, but they now represent rolling periods instead of calendar-based periods.

### Why we made this change

The new approach provides several benefits:

- More consistent charts with comparable amounts of data.
- Better trend analysis across complete time periods.
- Less confusion at the beginning of a week or month.
- Easier comparison of recent API activity.

## Introducing Usage Quotas

Alongside historical statistics, you can now monitor your application's current quota consumption directly from the Application Details page.

For every connected API with quotas enabled, you'll see:

- Current quota consumption
- Total allowed requests
- Percentage of quota used
- Quota reset interval
- Current rate limit status

For example, you might see:

- **450 of 1,000 requests used**
- **Resets every week**
- **Not rate limited** or **Rate limited**

### Visual indicators

Usage is color coded to help you quickly identify APIs that may require attention.

- Green indicates normal usage.
- Orange indicates your application is approaching its quota.
- Red indicates the quota has been exceeded.

In addition, a status badge clearly indicates whether your application is currently being rate limited, making it easier to diagnose throttling or request failures.

## When should I use Usage Statistics vs. Usage Quotas?

Think of the two views as answering different questions.

Use **Application Usage** when you want to:

- Analyze historical traffic.
- Identify usage trends.
- Compare activity over time.
- Understand how your application's usage has changed.

Use **Usage Quota** when you want to:

- Monitor remaining quota.
- Check how close you are to your limits.
- Verify whether your application is currently rate limited.
- Troubleshoot requests that may be rejected because of quota or rate limiting.

## How quotas are configured

Usage quotas and rate limits are managed through Usage Plans configured by API administrators.

Depending on the API, a Usage Plan may define:

- Application-level quotas
- Application-user quotas
- Rate limits
- Reset windows

The Developer Portal automatically presents the relevant usage and quota information on the Application Details page.

## Summary

This update gives you a clearer picture of your API consumption by combining historical usage statistics with real-time quota monitoring.

The updated rolling time periods make usage charts easier to interpret and compare, while the new Usage Quota view helps you stay on top of your application's limits and quickly identify rate limiting before it impacts your integration.
