forked from Mozilla-Ocho/Memory-Cache-Browser-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.json
1 lines (1 loc) · 10.7 KB
/
openapi.json
1
{"openapi":"3.1.0","info":{"title":"Memory Cache Hub","description":"A backend server for Memory Cache.","version":"0.1.0"},"paths":{"/api/v1/list_projects":{"get":{"tags":["projects"],"summary":"List Projects","operationId":"list_projects_api_v1_list_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResponse"}}}}}}},"/api/v1/create_project":{"post":{"tags":["projects"],"summary":"Create Project","operationId":"create_project_api_v1_create_project_post","parameters":[{"name":"project_name","in":"query","required":true,"schema":{"type":"string","title":"Project Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/delete_project":{"delete":{"tags":["projects"],"summary":"Delete Project","operationId":"delete_project_api_v1_delete_project_delete","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/create_project_directory":{"post":{"tags":["projects"],"summary":"Create Project Directory","operationId":"create_project_directory_api_v1_create_project_directory_post","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/list_project_directories":{"get":{"tags":["projects"],"summary":"List Project Directories","operationId":"list_project_directories_api_v1_list_project_directories_get","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/delete_project_directory":{"delete":{"tags":["projects"],"summary":"Api Delete Project Directory","operationId":"api_delete_project_directory_api_v1_delete_project_directory_delete","parameters":[{"name":"directory_id","in":"query","required":true,"schema":{"type":"integer","title":"Directory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/upload_file":{"post":{"tags":["files"],"summary":"Upload File","operationId":"upload_file_api_v1_upload_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_upload_file_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/list_project_files/{project_id}":{"get":{"tags":["files"],"summary":"List Project Files","operationId":"list_project_files_api_v1_list_project_files__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response List Project Files Api V1 List Project Files Project Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sync_project_files":{"post":{"tags":["files"],"summary":"Api Sync Project Files","operationId":"api_sync_project_files_api_v1_sync_project_files_post","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/summarize_file":{"post":{"tags":["summaries"],"summary":"Api Summarize File","operationId":"api_summarize_file_api_v1_summarize_file_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeFileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest_project_files":{"post":{"tags":["ingest"],"summary":"Ingest Project Files","operationId":"ingest_project_files_api_v1_ingest_project_files_post","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rag_ask":{"post":{"tags":["rag"],"summary":"Rag Ask","operationId":"rag_ask_api_v1_rag_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RagAskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/download_llamafile_by_name":{"post":{"tags":["llamafile"],"summary":"Download Llamafile By Name","operationId":"download_llamafile_by_name_api_v1_download_llamafile_by_name_post","parameters":[{"name":"llamafile_filename","in":"query","required":true,"schema":{"type":"string","title":"Llamafile Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/check_llamafile_status":{"post":{"tags":["llamafile"],"summary":"Check Llamafile Status","operationId":"check_llamafile_status_api_v1_check_llamafile_status_post","parameters":[{"name":"llamafile_filename","in":"query","required":true,"schema":{"type":"string","title":"Llamafile Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/start_llamafile":{"post":{"tags":["llamafile"],"summary":"Api Start Llamafile","operationId":"api_start_llamafile_api_v1_start_llamafile_post","parameters":[{"name":"llamafile_filename","in":"query","required":true,"schema":{"type":"string","title":"Llamafile Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stop_llamafile":{"post":{"tags":["llamafile"],"summary":"Api Stop Llamafile","operationId":"api_stop_llamafile_api_v1_stop_llamafile_post","parameters":[{"name":"llamafile_filename","in":"query","required":true,"schema":{"type":"string","title":"Llamafile Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/list_llamafiles":{"get":{"tags":["llamafile"],"summary":"List Llamafiles","operationId":"list_llamafiles_api_v1_list_llamafiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/delete_llamafile":{"delete":{"tags":["llamafile"],"summary":"Api Delete Llamafile","operationId":"api_delete_llamafile_api_v1_delete_llamafile_delete","parameters":[{"name":"llamafile_filename","in":"query","required":true,"schema":{"type":"string","title":"Llamafile Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_upload_file_api_v1_upload_file_post":{"properties":{"project_name":{"type":"string","title":"Project Name"},"file_path":{"type":"string","title":"File Path"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["project_name","file_path","file"],"title":"Body_upload_file_api_v1_upload_file_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ListProjectsResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/Project"},"type":"array","title":"Projects"}},"type":"object","required":["projects"],"title":"ListProjectsResponse"},"Project":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"is_removed":{"type":"boolean","title":"Is Removed","default":false}},"type":"object","required":["name"],"title":"Project"},"RagAskRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["project_id","prompt"],"title":"RagAskRequest"},"SummarizeFileRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"file_path":{"type":"string","title":"File Path"}},"type":"object","required":["project_id","file_path"],"title":"SummarizeFileRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}