Skip to main content
Version: 0.8

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.

MethodEndpointDescription
POST/queryExecute a query and return results synchronously
POST/query/streamExecute a query with server-sent event streaming
GET/query/historyList 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.

MethodEndpointDescription
GET/connectionsList all connections for the current tenant
POST/connectionsCreate 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}/testTest connectivity to the database
GET/connections/{id}/schemaRetrieve 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.

MethodEndpointDescription
GET/semantic/metricsList all defined metrics
POST/semantic/metricsCreate 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/dimensionsList dimensions
POST/semantic/dimensionsCreate a dimension

Authentication

MethodEndpointDescription
POST/auth/loginAuthenticate with email and password
POST/auth/refreshRefresh an access token
POST/auth/logoutInvalidate the current session
GET/auth/meGet the current user profile

API Keys

MethodEndpointDescription
GET/api-keysList API keys for the current user
POST/api-keysCreate a new API key
DELETE/api-keys/{id}Revoke an API key

Common Response Codes

CodeMeaning
200Success
201Created
400Bad request (check the detail field)
401Invalid or missing API key
403Insufficient permissions
404Resource not found
422Validation error (check detail for field-level errors)
429Rate 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.