Skip to main content

API Reference

Complete REST API documentation for InfoLens v1.

Base URL: http://localhost:24000 Auth: Bearer JWT or API Key
Quick Start
# Step 1: request a passwordless sign-in code (arrives by email; on a
# fresh install the console email provider prints it to the backend logs)
curl -s -X POST http://localhost:24000/v1/users/login/otp/request \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]"}'

# Step 2: verify the 6-digit code and capture the token
TOKEN=$(curl -s -X POST http://localhost:24000/v1/users/login/otp/verify \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","code":"123456"}' \
  | jq -r '.results.access_token.token')

# RAG query
curl -X POST http://localhost:24000/v1/retrieval/rag \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "What are the key findings?"}'

Authentication

User authentication and token management

GET/v1/users/auth/methodsPublic
POST/v1/users/login/otp/requestPublic
POST/v1/users/login/otp/verifyPublic
POST/v1/users/oauth/exchangePublic
POST/v1/users/refresh-tokenToken
POST/v1/users/logoutBearer
GET/v1/users/meBearer
GET/v1/tenants/meBearer

Documents

Document upload, management, and retrieval

POST/v1/documentsBearer
GET/v1/documentsBearer
GET/v1/documents/{id}Bearer
DELETE/v1/documents/{id}Bearer
GET/v1/documents/{id}/chunksBearer

Search & RAG

Semantic search and retrieval-augmented generation

POST/v1/retrieval/searchBearer
POST/v1/retrieval/ragBearer
POST/v1/retrieval/agentBearer

Collections

Group and organize documents

POST/v1/collectionsBearer
GET/v1/collectionsBearer
GET/v1/collections/{id}Bearer
DELETE/v1/collections/{id}Bearer

Tenant Management

Multi-tenant administration (requires admin permissions)

POST/v1/tenantsSuperuser
GET/v1/tenantsSuperuser
GET/v1/tenants/{id}/rolesAdmin
POST/v1/tenants/{id}/rolesAdmin
GET/v1/tenants/{id}/usersAdmin
POST/v1/tenants/{id}/usersAdmin
GET/v1/tenants/{id}/auditAdmin