---
title: "Get a specific data source"
method: GET
path: "/api/sources/{sourceId}"
---

# Get a specific data source

`GET /api/sources/{sourceId}`

Returns details of a single data source by ID

## Path parameters

- `sourceId` string, required

## Response `200`

Successful response with data source details

- 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)

## Other responses

- `404` — Data source not found

## Changes

- **2026-07-17** `8178674f7647` — 1 info
  - added the optional property `description` to the response with the `200` status
- **2025-12-23** `3624c28d55c4` — 2 warning, 2 info
  - removed the optional property `max_rows` from the response with the `200` status
  - removed the optional property `readonly` from the response with the `200` status
  - added the optional property `tools/items/max_rows` to the response with the `200` status
  - added the optional property `tools/items/readonly` to the response with the `200` status
- **2025-12-23** `874b018fead6` — 1 info
  - added the optional property `tools/items/statement` to the response with the `200` status
- **2025-12-19** `288ea6b69e83` — 1 breaking
  - removed the required property `is_default` from the response with the `200` status
- **2025-11-26** `86409510341c` — 1 info
  - added the required property `tools` to the response with the `200` status

[Full history](https://skmtc.dev/bytebase/apis/dbhub-data-sources-api/changes/api/sources/:sourceId/get.md)

---

[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)
