---
title: "Test connectivity to a connection's warehouse."
method: POST
path: "/v1/connections/{id}/test"
tags: ["connections"]
---

# Test connectivity to a connection's warehouse.

`POST /v1/connections/{id}/test`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/v1/connections/{id}/test`
- Auth: one of:
  - API key in cookie `dvt_session`
  - HTTP bearer

Opens the warehouse with the connection's stored credential and runs a trivial probe
(`SELECT 1`) through the engine query path (the engine remains the sole decryptor —
ADR-0012), then records the outcome on the connection (`lastTestedAt` / `lastTestError`).
Admin or above.

A failed probe is a normal `200` result with `ok: false` and an `error` message —
reachability is a result, not an API error; `4xx`/`5xx` are reserved for authorization
and not-found. A connection with no stored credential returns `ok: false` without
contacting the warehouse.

## Response `200`

The test outcome (whether or not the warehouse was reachable).

- object
  - `data` object, required
    - `ok` boolean, required: True when the probe succeeded.
    - `error` string: Failure detail when ok is false; omitted on success.
    - `testedAt` string, date-time, required

## Other responses

- `401`: Missing, invalid, or expired session.
- `403`: The caller's role does not permit this action.
- `404`: Resource does not exist.
- `429`: Per-actor API rate limit exceeded (SEC-2). All authenticated `/v1` routes apply a per-actor fixed-window default tier; selected compute-heavy routes (connection tests, column describe, data export) apply an additional tighter tier. Auth endpoints apply a per-IP tier. Problem type: `https://docs.dvt.dev/errors/rate-limited`. Wait for the `Retry-After` response header value (seconds) before retrying.

---

[API](https://skmtc.dev/dvt/apis/dvt-rest-api.md) · [All operations](https://skmtc.dev/dvt/apis/dvt-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dvt/apis/dvt-rest-api/revisions/00016f504165?raw)
