Aller au contenu principal

Référence API

Documentation complète de l'API REST d'InfoLens v1.

URL de base : http://localhost:24000 Auth : Bearer JWT ou clé API
Démarrage rapide
# 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?"}'

Authentification

Authentification des utilisateurs et gestion des jetons

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

Importation, gestion et récupération de documents

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

Recherche et RAG

Recherche sémantique et génération augmentée par récupération

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

Collections

Regrouper et organiser les documents

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

Gestion des tenants

Administration multi-tenant (nécessite des permissions d'administrateur)

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