curl --request GET \
     --url 'https://mdb.ai/api/datasources/datasource_name?check_connection=true' \
     --header 'Authorization: Bearer MINDS_API_KEY'
{
    "connection_data": {
        "database": "demo",
        "host": "samples.mindsdb.com",
        "password": "demo_password",
        "port": "5432",
        "schema": "demo_data",
        "user": "demo_user"
    },
    "connection_status": {
        "error_message": null,
        "success": true
    },
    "description": "House sales data",
    "engine": "postgres",
    "name": "my_datasource",
    "tables": ["house_sales"]
}
This API endpoint retrieves details about a specific Datasource using the GET method.

Body

check_connection
string
Set this value to true to check the connection to the data source.

Response

connection_data
object
required
Details for connecting to the data source including host, port, user, password, etc.
connection_status
object
The status of the connection test, if check_connection=true. Includes success flag and error message if applicable.
description
string
Optional description of the datasource.
engine
string
required
The engine type of the datasource (e.g., postgres).
name
string
required
The unique name of the datasource.
tables
array
List of tables that are accessible from this datasource.

Authorization

A valid API key must be passed in the Authorization header:
Authorization: Bearer MINDS_API_KEY
Generate your API key here.

Path Parameters

datasource_name
string
required
The name of the Datasource you want to retrieve.
curl --request GET \
     --url 'https://mdb.ai/api/datasources/datasource_name?check_connection=true' \
     --header 'Authorization: Bearer MINDS_API_KEY'
{
    "connection_data": {
        "database": "demo",
        "host": "samples.mindsdb.com",
        "password": "demo_password",
        "port": "5432",
        "schema": "demo_data",
        "user": "demo_user"
    },
    "connection_status": {
        "error_message": null,
        "success": true
    },
    "description": "House sales data",
    "engine": "postgres",
    "name": "my_datasource",
    "tables": ["house_sales"]
}