Data Sources

Data Sources

Connect any of your databases or files to Retail Mind. All credentials are encrypted at rest using AES-128 (Fernet).

Supported Sources

Typesource_type value
PostgreSQLpostgresql
MySQL / MariaDBmysql
SQLitesqlite
Google BigQuerybigquery
Snowflakesnowflake
CSV filecsv
Excel fileexcel

Connect a PostgreSQL Database

curl -X POST http://localhost:8000/v1/sources \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production DB",
    "source_type": "postgresql",
    "credentials": {
      "host": "db.example.com",
      "port": 5432,
      "database": "retail",
      "user": "readonly_user",
      "password": "s3cr3t"
    }
  }'

Trigger Schema Sync

After connecting, kick off a schema discovery job so Retail Mind learns your table structure:

curl -X POST http://localhost:8000/v1/sources/{source_id}/sync \
  -H "Authorization: Bearer $API_KEY"

List Sources

curl http://localhost:8000/v1/sources \
  -H "Authorization: Bearer $API_KEY"