Docs API Reference

REST API and Python SDK

Base URL: https://api.navalabshq.com/v1. Authenticate with your API key in the Authorization header.

Authentication

All API requests require an API key passed in the Authorization header:

HTTP
GET /v1/sources HTTP/1.1
Host: api.navalabshq.com
Authorization: Bearer nvl_live_...
Content-Type: application/json

API keys are scoped to your workspace and available in your dashboard settings. Rotate them from the same location.

Query execution

POST /v1/query

Execute a SQL query across one or more connected sources. Returns results as a JSON array.

Request body
{
"sql": "SELECT u.email, COUNT(e.id) ...",
"cache_ttl": 300,
"max_rows": 10000
}

Sources

GET /v1/sources

List all connected sources in your workspace.

POST /v1/sources

Add a new data source. Returns the source object with its assigned ID and discovered schema summary.

DELETE /v1/sources/{id}

Remove a connected source. Does not delete any data in the source system.

Observability

GET /v1/sources/{id}/schema

Return the current schema snapshot for a source, including column types and nullability.

GET /v1/sources/{id}/drift

Return the schema drift history for a source. Paginated by since and until Unix timestamps.

Webhooks

POST /v1/webhooks

Register a webhook endpoint to receive schema drift and row count anomaly events. Nava Labs signs each delivery with HMAC-SHA256.

Error codes

Error response
{
"error": {
"code": "source_not_found",
"message": "Source 'src_abc123' not found",
"status": 404
}
}