Saltar al contenido principal

Referencia de API

Documentación completa de la API REST de InfoLens v1.

URL base: http://localhost:24000 Auth: Bearer JWT o clave API
Inicio rápido
# 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?"}'

Autenticación

Autenticación de usuarios y gestión de tokens

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

Documentos

Carga, gestión y recuperación de documentos

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

Búsqueda y RAG

Búsqueda semántica y generación aumentada por recuperación

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

Colecciones

Agrupar y organizar documentos

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

Gestión de tenants

Administración multi-tenant (requiere permisos de administrador)

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