docs/minds/rest_api/add_data_to_mind.mdx
This API endpoint adds a data source to a specific Mind using the POST method.
The name of the data source to be added to the Mind. Use this endpoint to create data sources.
</ParamField> <ParamField body='check_connection' type='string'>Set this value to true to check the connection to the data source.
Indicates whether the data source was successfully added to the Mind.
</ResponseField>A valid API key must be passed in the Authorization header:
Authorization: Bearer MINDS_API_KEY
Generate your API key here.
The name of the Mind to which the data source will be added.
</ParamField> <RequestExample>curl --request POST \
--url 'https://mdb.ai/api/projects/mindsdb/minds/mind_name_new/datasources' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer MINDS_API_KEY' \
--data '{
"name": "datasource_name",
"check_connection": true
}'
from minds.client import Client
client = Client("MINDS_API_KEY", "https://mdb.ai/")
mind.add_datasource(postgres_config)
{
"success": true
}