> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dbhost.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connection history and access audit

> See verified PgBouncer connection events for 7 days, daily totals for 30 days and owner access changes for 90 days on each DBHost database.

The **Activity** and **Access** tabs on the database page show who connected
and who changed access. Three views cover different time spans:

| View | Retention | What it shows |
| - | - | - |
| **Connections** (Activity tab) | 7 days | Individual PgBouncer events: **Attempted**, **Signed in**, **Refused**, **Disconnected**, with role and TLS status |
| **Daily totals** (Activity tab, under Connections) | 30 days | Daily counts per outcome and TLS status |
| **Access changes** (Access tab) | 90 days | Owner-initiated role, credential, member and network changes |

**Attempted** does not prove a successful login; look for **Signed in** or
**Refused** to see the outcome.

## Sampled clients are separate

**Sampled live clients** on the Activity tab shows a sample of live
PgBouncer clients (username, client IP, application name and time). It is
sampled, not a complete log, and is shown separately from the verified events.

## What is not shown

* SQL text, passwords, tokens and TLS ciphers
* Logins that DBHost cannot attribute to this database
* Access changes made by collaborators, and older unattributed events
* Sessions on the [direct migration connection](/guides/direct-migrations)

## Incomplete history

DBHost collects events from PgBouncer logs. If collection was interrupted,
the page says **Some events may be missing.** Stopping a database, or
deleting it and recovering it within seven days, does not by itself lose the
events that were made while it was running; an event that could not be
attributed within ten minutes of happening is not shown.
Even without a recorded gap, the history is not a guaranteed complete record
of every connection.

## API and CLI

On Pro and Business:

* [`GET /api/v1/databases/{id}/connection-events`](/api-reference/databases/connection-events)
* [`GET /api/v1/databases/{id}/access-audit`](/api-reference/databases/access-audit)
* `dbhost databases events <id>` and `dbhost databases access-audit <id>` in
  CLI 0.3.7 or newer


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.