v1

latestOpenAPI 3.0.32026-07-17256.5 KB

Get a specific data source

Returns details of a single data source by ID

get/api/sources/{sourceId}

Path parameters

sourceIdstring required

Unique identifier of the data source

Response

Successful response with data source details

idstring required

Unique identifier for the data source

descriptionstring

Human-readable description of the data source

type'postgres' | 'mysql' | 'mariadb' | 'sqlserver' | 'sqlite' required

Database type

hoststring

Database host (not present for SQLite)

portinteger

Database port (not present for SQLite)

databasestring

Database name or file path (for SQLite)

userstring

Database username (not present for SQLite)

Example response

{
  "id": "prod_pg",
  "description": "Production read replica for analytics queries",
  "type": "postgres",
  "host": "localhost",
  "port": 5432,
  "database": "production",
  "user": "dbuser",
  "ssh_tunnel": {
    "enabled": true,
    "ssh_host": "bastion.example.com",
    "ssh_port": 22,
    "ssh_user": "deploy"
  },
  "tools": [
    {
      "name": "execute_sql_prod_pg",
      "description": "Execute a SQL query on the 'prod_pg' postgres database (default)",
      "parameters": [
        {
          "name": "sql",
          "type": "string",
          "required": true,
          "description": "SQL query or multiple SQL statements to execute (separated by semicolons)"
        }
      ],
      "statement": "SELECT * FROM users WHERE id = $1",
      "readonly": true,
      "max_rows": 1000
    }
  ]
}