---
title: "Aggregated Usage"
method: GET
path: "/v2/databases/{db_id}/usage"
tags: ["Database (v2)"]
---

# Aggregated Usage

`GET /v2/databases/{db_id}/usage`

## Request

- Base URL: `https://api.bunny.net/database`
- URL: `https://api.bunny.net/database/v2/databases/{db_id}/usage`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-database-backend-api/docs/v2/databases/:db_id/usage/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the aggregated usage for the time period for a Database.

## Path parameters

- `db_id` string, required: [DatabaseId] is a `db_<ulid>`

## Query parameters

- `from` string, date-time, required
- `to` string, date-time, required

## Response `200`

- UsageDatabaseV2Response
  - `rows_read` integer, required: Rows read this month
  - `rows_written` integer, required: Rows written this month
  - `avg_latency_ms` number, double, required: Average Latency this month

## Other responses

- `4XX`: A default error response for most API errors.
- `5XX`: A default error response for most API errors.

---

[API](https://skmtc.dev/bunny/apis/bunny-database-backend-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-database-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-database-backend-api/revisions/f3bb69bad6b6?raw)
