REST API
Integrate DBCraft into your applications with our comprehensive REST API.
Base URL
https://your-dbcraft-instance.com/api/v1
Authentication
All API requests require a JWT token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/login | Authenticate and get JWT token |
| POST | /api/v1/auth/register | Register a new user |
| GET | /api/v1/datasources | List all data sources |
| POST | /api/v1/datasources | Create a new data source |
| POST | /api/v1/queries/execute | Execute a SQL query |
| GET | /api/v1/dashboards | List all dashboards |
| GET | /api/v1/dashboards/:id | Get dashboard by ID |
| GET | /api/v1/health | Health check endpoint |
