curl --request PATCH \
     --url 'https://mdb.ai/api/datasources/datasource_name' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer MINDS_API_KEY' \
     --data '{
         "connection_data": {
             "user": "demo_user",
             "password": "demo_password",
             "host": "samples.mindsdb.com",
             "port": "5432",
             "database": "demo",
             "schema": "demo_data"
         },
         "tables": ["sales_data"],
         "description": "Sales data" 
     }'
200 OK
This API endpoint updates the Datasource’s description and/or connection parameters and/or list of tables using the PATCH method.

Body

description
string
Provide a new description for the Datasource, which is used by the Mind to decide the relevant datasources for each question.
connection_data
array
Provide the updated connection parameters for the selected engine. See available engines and connection parameters here.
tables
array
This is an optional parameter that lets you specify tables that can be accessed by the Mind.

Response

status
string
required
HTTP status code indicating success. 200 OK confirms the Datasource was updated.

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 update.
curl --request PATCH \
     --url 'https://mdb.ai/api/datasources/datasource_name' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer MINDS_API_KEY' \
     --data '{
         "connection_data": {
             "user": "demo_user",
             "password": "demo_password",
             "host": "samples.mindsdb.com",
             "port": "5432",
             "database": "demo",
             "schema": "demo_data"
         },
         "tables": ["sales_data"],
         "description": "Sales data" 
     }'
200 OK