ibl-data-manager (3.59.0-ai-plus)
API for iblai
Request
Train a document directly without using a worker.
This endpoint is designed for training smaller documents directly without queuing them through a worker process. For larger documents, use the TrainDocumentView endpoint instead.
Args: request: The HTTP request containing the document information. org: Organization key identifier.
Returns: Response: A confirmation that the document was trained successfully.
Raises: ValidationError: If the request data is invalid. BadRequest: If the document training failed.
- multipart/form-data
- application/x-www-form-urlencoded
- application/json
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/
https://base.manager.iblai.app/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.ibl.ai/_mock/apis/ibl/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: multipart/form-data' \
-F pathway=string \
-F url=string
{ "detail": "Document trained successfully" }
Request
Description: Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file. Process document for use in a specific chat session. which will be processed and made available for the AI to reference when responding to queries in that session.
Methods:
- POST: Submits a document or media file for training within a specified chat session.
Parameters:
- org (str):
- session_id (str): UUID of the chat session for which the document is being submitted.
- *args, **kwargs: Additional arguments.
- file (file): Multipart file input.
Returns:
- POST: Returns a JSON message with the result of the upload process. Response code 200 on success. { "message": "File processed." }
Error Responses:
- 400 Bad Request:
- "File field is required" if the 'file' parameter is missing.
- "invalid file object" if the file object is not valid.
- Specific error message if an exception occurs while saving to Redis.
- 404 Not Found:
- "Session not found" if the provided session_id does not match any existing session.
- 413 Request Entity Too Large:
- "file is too large" including specific limits for document and media files if the file exceeds size limits.
Access Control: Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
- multipart/form-data
- application/x-www-form-urlencoded
- application/json
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/
https://base.manager.iblai.app/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.ibl.ai/_mock/apis/ibl/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: multipart/form-data' \
-F file=string
{ "message": "File processed." }
Request
Retrieve detailed information about a specific scraped resource.
This endpoint returns the complete scraped data for a specific resource identified by its ID.
Args: request: The HTTP request. org: Organization key identifier. user_id: The username of the user associated with the resource. resource_id: The ID of the resource to retrieve.
Returns: Response: The complete scraped data for the specified resource.
Raises: NotFound: If the specified resource data does not exist.
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/
https://base.manager.iblai.app/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.ibl.ai/_mock/apis/ibl/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/' \
-H 'Authorization: YOUR_API_KEY_HERE'
scrapped
- Scrapedfailed
- Failedpending
- Pendingunscrapped
- Unscraped
scrapped
- Scrapedfailed
- Failedpending
- Pendingunscrapped
- Unscraped
{ "id": 1, "resource": { "id": 101, "name": "Introduction to Machine Learning", "data": { … } }, "content_type": "content", "content": "Machine learning is a field of study that gives computers the ability to learn without being explicitly programmed...", "extra_data": { "title": "Introduction to Machine Learning", "description": "A comprehensive guide to machine learning concepts and applications", "author": "John Smith", "published_date": "2023-01-15" }, "date_created": "2023-06-15T10:30:00Z" }