---
title: "Audit log statistics"
method: GET
path: "/v1/default/banks/{bank_id}/audit-logs/stats"
tags: ["Audit"]
---

# Audit log statistics

`GET /v1/default/banks/{bank_id}/audit-logs/stats`

## Request

- Base URL: `https://hindsight.vectorize.io` (the document declares no server; this is the origin it was published from)
- URL: `https://hindsight.vectorize.io/v1/default/banks/{bank_id}/audit-logs/stats`
- Auth: none declared
- TypeScript: <https://skmtc.dev/vectorize/apis/hindsight-http-api/docs/v1/default/banks/:bank_id/audit-logs/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

Get audit log counts grouped by time bucket for charting.

## Path parameters

- `bank_id` string, required

## Query parameters

- `action` string, nullable: Filter by action type
- `period` string: Time period: 1d, 7d, or 30d

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- AuditLogStatsResponse: Response model for audit log stats endpoint.
  - `bank_id` string, required
  - `period` string, required
  - `trunc` string, required
  - `start` string, required
  - `buckets` AuditLogStatsBucket[], required
    - `time` string, required
    - `actions` object, required
    - `total` integer, required

## Other responses

- `404`: The bank does not exist.
- `422`: Validation Error

## Changes

- **2026-10-04** `4fda98b75f63`: 1 warning, 1 info
  - removed the optional property `detail/items/url` from the response with the `422` status
  - added the non-success response with the status `404`
- **2026-05-15** `0d08f271b9db`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vectorize/apis/hindsight-http-api/changes/v1/default/banks/:bank_id/audit-logs/stats/get.md)

---

[API](https://skmtc.dev/vectorize/apis/hindsight-http-api.md) - [All operations](https://skmtc.dev/vectorize/apis/hindsight-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vectorize/apis/hindsight-http-api/revisions/45e711cd0897?raw)
