API Reference
The Nexatron REST API is organized around resource groups. All endpoints are prefixed with /api/v1 and require authentication.
Base URL: https://api.nexatron.dotsolved.ai/api/v1
Authentication: pass your API key in the Authorization header:
Authorization: Bearer nxa_your_api_key_here
API keys are issued from the in-product Settings → API keys page. Keys are scoped to a single tenant and can be revoked at any time.
Query
Execute natural language queries against connected databases.
| Method | Endpoint | Description |
|---|---|---|
POST | /query | Execute a query and return results synchronously |
POST | /query/stream | Execute a query with server-sent event streaming |
GET | /query/history | List recent queries for the authenticated user |
GET | /query/{id} | Retrieve a specific query result by ID |
DELETE | /query/{id} | Delete a query from history |
POST /query
{
"question": "What were total sales last quarter?",
"conversation_id": "conv_abc123",
"connection_id": "conn_xyz789",
"format": "json"
}
Response (200):
{
"id": "qry_a1b2c3",
"question": "What were total sales last quarter?",
"data": [{"total_sales": 1284350.00}],
"summary": "Total sales last quarter were $1,284,350.00.",
"conversation_id": "conv_abc123",
"connection_id": "conn_xyz789",
"execution_time_ms": 342,
"created_at": "2026-04-07T10:30:00Z"
}
Connections
Manage database connections.
| Method | Endpoint | Description |
|---|---|---|
GET | /connections | List all connections for the current tenant |
POST | /connections | Create a new database connection |
GET | /connections/{id} | Get connection details |
PATCH | /connections/{id} | Update connection settings |
DELETE | /connections/{id} | Remove a connection |
POST | /connections/{id}/test | Test connectivity to the database |
GET | /connections/{id}/schema | Retrieve the schema for the connected database |
Supported Database Types
PostgreSQL, MySQL, Snowflake, BigQuery, Redshift, MS SQL Server, ClickHouse.
Semantic Layer
Define and manage business metrics, dimensions, and relationships.
| Method | Endpoint | Description |
|---|---|---|
GET | /semantic/metrics | List all defined metrics |
POST | /semantic/metrics | Create a new metric definition |
GET | /semantic/metrics/{id} | Get metric details |
PATCH | /semantic/metrics/{id} | Update a metric |
DELETE | /semantic/metrics/{id} | Remove a metric |
GET | /semantic/dimensions | List dimensions |
POST | /semantic/dimensions | Create a dimension |
Authentication
| Method | Endpoint | Description |
|---|---|---|
POST | /auth/login | Authenticate with email and password |
POST | /auth/refresh | Refresh an access token |
POST | /auth/logout | Invalidate the current session |
GET | /auth/me | Get the current user profile |
API Keys
| Method | Endpoint | Description |
|---|---|---|
GET | /api-keys | List API keys for the current user |
POST | /api-keys | Create a new API key |
DELETE | /api-keys/{id} | Revoke an API key |
Common Response Codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request (check the detail field) |
401 | Invalid or missing API key |
403 | Insufficient permissions |
404 | Resource not found |
422 | Validation error (check detail for field-level errors) |
429 | Rate limited (check Retry-After header) |
Rate Limits
Rate limit headers are included in every response:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1712505600
Limits vary by plan. Contact your account team for plan-specific quotas.
Enterprise endpoints
SCIM provisioning, audit log access, billing, and analytics endpoints are documented separately and are available to enterprise customers. Contact your account team for the enterprise API guide.