تخطى إلى المحتوى الرئيسي

مرجع API

توثيق كامل لـ REST API الخاص بـ InfoLens الإصدار 1.

عنوان URL الأساسي: http://localhost:24000 المصادقة: Bearer JWT أو مفتاح API
البدء السريع
# 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?"}'

المصادقة

مصادقة المستخدم وإدارة الرموز

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

المستندات

رفع المستندات وإدارتها واسترجاعها

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

البحث و RAG

البحث الدلالي والتوليد المعزز بالاسترجاع

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

المجموعات

تجميع المستندات وتنظيمها

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

إدارة المستأجرين

إدارة تعدد المستأجرين (تتطلب صلاحيات المسؤول)

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