---
title: "Get traffic by client"
method: GET
path: "/api/v1/databases/{database_id}/metrics/clients"
tags: ["Managed Databases"]
---

# Get traffic by client

`GET /api/v1/databases/{database_id}/metrics/clients`

## Request

- Base URL: `https://api.rafftechnologies.com`
- URL: `https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics/clients`
- Auth: API key in header `X-API-Key`

Operations, errors, and warnings per database user over a window, bucketed for charting. A value of `-1` means the engine does not count that number per user.

## Path parameters

- `database_id` string, required

## Query parameters

- `window_hours` integer

## Response `200`

Traffic per database user

- object
  - `success` boolean
  - `clients` DatabaseClientTraffic[]
    - `user` string: Database user
    - `total_ops` integer
    - `total_errors` integer
    - `total_warnings` integer
    - `points` object[]
      - `recorded_at` string, date-time
      - `ops` integer
      - `errors` integer
      - `warnings` integer
  - `bucket_seconds` integer: Seconds each point covers

## Other responses

- `401`: Authentication required
- `404`: Resource not found

## Changes

- **2026-10-05** `26292956c4b3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rafftechnologies/apis/raff-api/changes/api/v1/databases/:database_id/metrics/clients/get.md)

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) - [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rafftechnologies/apis/raff-api/revisions/3d30cde0acb4?raw)
