---
title: "List all data sources"
method: GET
path: "/api/sources"
---

# List all data sources

`GET /api/sources`

Returns an array of all configured database data sources

## Response `200`

Successful response with array of data sources

- DataSource[]
  - `id` string, required — Unique identifier for the data source
  - `description` string — Human-readable description of the data source
  - `type` 'postgres' | 'mysql' | 'mariadb' | 'sqlserver' | 'sqlite', required — Database type
  - `host` string — Database host (not present for SQLite)
  - `port` integer — Database port (not present for SQLite)
  - `database` string — Database name or file path (for SQLite)
  - `user` string — Database username (not present for SQLite)
  - `ssh_tunnel` SSHTunnel — SSH tunnel configuration (credentials excluded for security)
    - `enabled` boolean, required — Whether SSH tunneling is enabled
    - `ssh_host` string — SSH bastion host
    - `ssh_port` integer — SSH port
    - `ssh_user` string — SSH username
  - `tools` Tool[], required — Available MCP tools for this data source
    - `name` string, required — Tool name
    - `description` string, required — Tool description
    - `parameters` ToolParameter[], required — Tool input parameters
      - `name` string, required — Parameter name
      - `type` string, required — Parameter type
      - `required` boolean, required — Whether the parameter is required
      - `description` string, required — Parameter description
    - `statement` string — SQL statement template for custom tools (with parameter placeholders)
    - `readonly` boolean — Whether the tool is restricted to read-only operations (execute_sql and custom tools only)
    - `max_rows` integer — Maximum number of rows returned by SELECT queries (execute_sql and custom tools only)

---

[API](https://skmtc.dev/bytebase/apis/dbhub-data-sources-api.md) · [All operations](https://skmtc.dev/bytebase/apis/dbhub-data-sources-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bytebase/dbhub-data-sources-api/revisions/8178674f7647/schema)
