-
Notifications
You must be signed in to change notification settings - Fork 0
Endpoints
This documentation provides details about the API endpoints available and how to interact with them using Postman.
Checks the health status of the application.
-
200 OK: Health status information.
GET http://localhost:8000/health-check
Retrieves the result of a task based on its ID.
-
task_id(string): The ID of the task.
-
200 OK: Task status and result information.
GET http://localhost:8000/task/12345
Initiates a task to load data from a specified path.
-
input(Load): Object containing the filepath.
-
202 Accepted: Task accepted. -
400 Bad Request: File type not implemented.
POST http://localhost:8000/load_by_path Content-Type: application/json
{ "filepath": "/path/to/file" }
Starts the authorization process for Office 365.
-
200 OK: Authorization URL.
GET http://localhost:8000/office_auth
Retrieves the access token using the authorization code.
-
code(string): Authorization code.
-
200 OK: Access token and task ID. -
400 Bad Request: Authorization code not found. -
500 Internal Server Error: Error acquiring token.
POST http://localhost:8000/token?code=auth_code_here
Uploads a model and its configuration.
-
model(file): The model file. -
config(file): The configuration file. -
description(string): Description of the model.
-
202 Accepted: Task accepted. -
400 Bad Request: File type not implemented.
POST http://localhost:8000/load_model Content-Type: multipart/form-data
{ "model": , "config": , "description": "Model description" }
Requests inference from a loaded model.
-
model(string): The model name. -
data(string): JSON string of input data.
-
200 OK: Inference results. -
400 Bad Request: Invalid JSON input. -
500 Internal Server Error: Model not valid.
POST http://localhost:8000/get_inference Content-Type: application/json
{ "model": "model_name", "data": "{"key": "value"}" }
Executes a query on the specified index.
-
query(string): The query string. -
index(string): The index to search.
-
200 OK: Query results.
POST http://localhost:8000/query Content-Type: application/json
{ "query": "search query", "index": "index_name" }
Sorts documents based on the specified type.
-
type(string): The type of sort (name, size, type, created).
-
200 OK: Sorted documents.
POST http://localhost:8000/sort Content-Type: application/x-www-form-urlencoded
type=name
Starts the authentication process for Google Drive.
-
200 OK: Redirects to Google Drive authentication.
GET http://localhost:8000/google_drive_auth
Displays the Google Drive picker for selecting files.
-
200 OK: HTML response for Google Picker.
GET http://localhost:8000/picker
Handles the file selected in Google Picker.
-
name(string): The name of the selected file.
-
200 OK: File selection confirmation.
POST http://localhost:8000/selected_file Content-Type: application/json
{ "name": "selected_file_name" }
Confirms the completion of file selection.
-
200 OK: Confirmation message.
GET http://localhost:8000/done
Sends a chat message to the model and retrieves the response.
-
user_id(string): The user ID.
-
message(string): The chat message.
-
200 OK: Chat response.
POST http://localhost:8000/chat/user123 Content-Type: application/json
{ "message": "Hello, how are you?" }
Retrieves the chat history for a user.
-
user_id(string): The user ID. -
history_id(int): The history ID.
-
200 OK: Chat history.
GET http://localhost:8000/chat_history/user123/1
Retrieves all chat histories for a user.
-
user_id(string): The user ID.
-
200 OK: List of chat history IDs.
GET http://localhost:8000/get_user_chat_histories/user123
Pings a specified database to check connectivity.
-
database(string): The database type. -
connectionString(string, optional): The connection string. -
host(string, optional): The database host. -
user(string, optional): The database user. -
password(string, optional): The database password.
-
200 OK: Connectivity status.
POST http://localhost:8000/ping_database Content-Type: application/json
{ "database": "mysql", "host": "localhost", "user": "root", "password": "password" }
Retrieves a list of all databases.
-
200 OK: List of databases.
GET http://localhost:8000/databases/
Edits the connection details for a database.
-
connection_id(string): The connection ID.
-
database(string): The database type. -
connectionString(string, optional): The connection string. -
host(string, optional): The database host. -
user(string, optional): The database user. -
password(string, optional): The database password.
-
200 OK: Connectivity status.
POST http://localhost:8000/edit_connection/12345 Content-Type: application/json
{ "database": "mysql", "host": "localhost", "user": "root", "password": "password" }
Deletes a database connection.
-
connection_id(string): The connection ID.
-
200 OK: Deletion status.
DELETE http://localhost:8000/delete_connection/12345
Loads data from an uploaded file and starts a task.
-
file(UploadFile): The file to be uploaded.
-
202 Accepted: Task accepted. -
500 Internal Server Error: Error while processing the file.
POST http://localhost:8000/load_query Content-Type: multipart/form-data
{ "file": }
Opens a WebSocket connection to receive progress updates.
-
filename(string): The name of the file being uploaded.
ws://localhost:8000/ws/filename