مرجع 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/methodsDiscover enabled sign-in methodsPublicPOST
/v1/users/login/otp/requestRequest a passwordless sign-in code by emailPublicPOST
/v1/users/login/otp/verifyVerify the emailed code, receive tokensPublicPOST
/v1/users/oauth/exchangeExchange an OAuth handoff code for tokensPublicPOST
/v1/users/refresh-tokenRefresh access tokenTokenPOST
/v1/users/logoutInvalidate current sessionBearerGET
/v1/users/meGet current user profileBearerGET
/v1/tenants/meGet tenant context, roles, CASL abilitiesBearerالمستندات
رفع المستندات وإدارتها واسترجاعها
POST
/v1/documentsUpload a document (multipart)BearerGET
/v1/documentsList documents with paginationBearerGET
/v1/documents/{id}Get document detailsBearerDELETE
/v1/documents/{id}Delete a documentBearerGET
/v1/documents/{id}/chunksList document chunksBearerالبحث و RAG
البحث الدلالي والتوليد المعزز بالاسترجاع
POST
/v1/retrieval/searchSemantic search across documentsBearerPOST
/v1/retrieval/ragRAG query with AI-generated answerBearerPOST
/v1/retrieval/agentConversational RAG agentBearerالمجموعات
تجميع المستندات وتنظيمها
POST
/v1/collectionsCreate a collectionBearerGET
/v1/collectionsList collectionsBearerGET
/v1/collections/{id}Get collection detailsBearerDELETE
/v1/collections/{id}Delete a collectionBearerإدارة المستأجرين
إدارة تعدد المستأجرين (تتطلب صلاحيات المسؤول)
POST
/v1/tenantsCreate a new tenantSuperuserGET
/v1/tenantsList all tenantsSuperuserGET
/v1/tenants/{id}/rolesList tenant rolesAdminPOST
/v1/tenants/{id}/rolesCreate custom roleAdminGET
/v1/tenants/{id}/usersList tenant usersAdminPOST
/v1/tenants/{id}/usersInvite user to tenantAdminGET
/v1/tenants/{id}/auditQuery audit logAdmin