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

# Test Warehouse Connection

> Run a test query with the stored credentials

Runs `SELECT 1` with the stored credentials. The result is saved on the connection: `status` becomes `connected`, or `error` with `lastError`. Requires `warehouse:write`.

<ParamField path="id" type="string" required>
  Connection ID.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/warehouse-connections/wconn_abc123/test" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "connection": {
      "id": "wconn_abc123",
      "name": "Snowflake prod",
      "provider": "snowflake",
      "config": {
        "account": "myorg-myaccount",
        "username": "SEQUENZY_READER",
        "warehouse": "ANALYTICS_WH",
        "database": "PROD",
        "schema": "PUBLIC",
        "role": "SEQUENZY_READ"
      },
      "status": "connected",
      "lastTestedAt": "2026-09-30T12:00:00.000Z",
      "lastError": null,
      "syncCount": 1,
      "createdAt": "2026-09-30T12:00:00.000Z",
      "updatedAt": "2026-09-30T12:00:00.000Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "code": "connection_failed",
    "error": "Could not connect to the database. Check the host and port, and allow connections from Sequenzy in your firewall."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "code": "not_found",
    "error": "Warehouse connection not found."
  }
  ```
</ResponseExample>


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