-
Notifications
You must be signed in to change notification settings - Fork 408
/
Copy pathopenapi.json
1 lines (1 loc) · 17.3 KB
/
openapi.json
1
{"openapi":"3.1.0","info":{"title":"GraphRAG","version":"v0.0.0"},"paths":{"/data":{"get":{"tags":["Data Management"],"summary":"Get all data storage containers.","description":"Retrieve a list of all data storage containers.","operationId":"get_all_data_storage_containers_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageNameList"}}}}}},"post":{"tags":["Data Management"],"summary":"Upload data to a data storage container","description":"Create a data storage container in Azure and upload files to it.\n\nArgs:\n files (List[UploadFile]): A list of files to be uploaded.\n storage_name (str): The name of the Azure Blob Storage container to which files will be uploaded.\n overwrite (bool): Whether to overwrite existing files with the same name. Defaults to True. If False, files that already exist will be skipped.\n\nReturns:\n BaseResponse: An instance of the BaseResponse model with a status message indicating the result of the upload.\n\nRaises:\n HTTPException: If the container name is invalid or if any error occurs during the upload process.","operationId":"upload_files_data_post","parameters":[{"name":"storage_name","in":"query","required":true,"schema":{"type":"string","title":"Storage Name"}},{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Overwrite"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_files_data_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data/{storage_name}":{"delete":{"tags":["Data Management"],"summary":"Delete a data storage container","description":"Delete a specified data storage container.","operationId":"delete_files_data__storage_name__delete","parameters":[{"name":"storage_name","in":"path","required":true,"schema":{"type":"string","title":"Storage Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/index":{"post":{"tags":["Index Operations"],"summary":"Build an index","operationId":"setup_indexing_pipeline_index_post","parameters":[{"name":"storage_name","in":"query","required":true,"schema":{"type":"string","title":"Storage Name"}},{"name":"index_name","in":"query","required":true,"schema":{"type":"string","title":"Index Name"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_setup_indexing_pipeline_index_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Index Operations"],"summary":"Get all indexes","description":"Retrieve a list of all index names.","operationId":"get_all_indexes_index_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexNameList"}}}}}}},"/index/{index_name}":{"delete":{"tags":["Index Operations"],"summary":"Delete a specified index","description":"Delete a specified index.","operationId":"delete_index_index__index_name__delete","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/index/status/{index_name}":{"get":{"tags":["Index Operations"],"summary":"Track the status of an indexing job","operationId":"get_index_job_status_index_status__index_name__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/query/global":{"post":{"tags":["Query Operations"],"summary":"Perform a global search across the knowledge graph index","description":"The global query method generates answers by searching over all AI-generated community reports in a map-reduce fashion. This is a resource-intensive method, but often gives good responses for questions that require an understanding of the dataset as a whole.","operationId":"global_query_query_global_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/query/local":{"post":{"tags":["Query Operations"],"summary":"Perform a local search across the knowledge graph index.","description":"The local query method generates answers by combining relevant data from the AI-extracted knowledge-graph with text chunks of the raw documents. This method is suitable for questions that require an understanding of specific entities mentioned in the documents (e.g. What are the healing properties of chamomile?).","operationId":"local_query_query_local_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/query/streaming/global":{"post":{"tags":["Query Streaming Operations"],"summary":"Stream a response back after performing a global search","description":"The global query method generates answers by searching over all AI-generated community reports in a map-reduce fashion. This is a resource-intensive method, but often gives good responses for questions that require an understanding of the dataset as a whole.","operationId":"global_search_streaming_query_streaming_global_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/query/streaming/local":{"post":{"tags":["Query Streaming Operations"],"summary":"Stream a response back after performing a local search","description":"The local query method generates answers by combining relevant data from the AI-extracted knowledge-graph with text chunks of the raw documents. This method is suitable for questions that require an understanding of specific entities mentioned in the documents (e.g. What are the healing properties of chamomile?).","operationId":"local_search_streaming_query_streaming_local_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/index/config/prompts":{"get":{"tags":["Index Configuration"],"summary":"Generate prompts from user-provided data.","description":"Generating custom prompts from user-provided data may take several minutes to run based on the amount of data used.","operationId":"generate_prompts_index_config_prompts_get","parameters":[{"name":"storage_name","in":"query","required":true,"schema":{"type":"string","title":"Storage Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/report/{index_name}/{report_id}":{"get":{"tags":["Sources"],"summary":"Return a single community report.","operationId":"get_report_info_source_report__index_name___report_id__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}},{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/text/{index_name}/{text_unit_id}":{"get":{"tags":["Sources"],"summary":"Return a single base text unit.","operationId":"get_chunk_info_source_text__index_name___text_unit_id__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}},{"name":"text_unit_id","in":"path","required":true,"schema":{"type":"string","title":"Text Unit Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextUnitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/entity/{index_name}/{entity_id}":{"get":{"tags":["Sources"],"summary":"Return a single entity.","operationId":"get_entity_info_source_entity__index_name___entity_id__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}},{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/claim/{index_name}/{claim_id}":{"get":{"tags":["Sources"],"summary":"Return a single claim.","operationId":"get_claim_info_source_claim__index_name___claim_id__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}},{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/relationship/{index_name}/{relationship_id}":{"get":{"tags":["Sources"],"summary":"Return a single relationship.","operationId":"get_relationship_info_source_relationship__index_name___relationship_id__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}},{"name":"relationship_id","in":"path","required":true,"schema":{"type":"integer","title":"Relationship Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/graphml/{index_name}":{"get":{"tags":["Graph Operations"],"summary":"Retrieve a GraphML file of the knowledge graph","operationId":"get_graphml_file_graph_graphml__index_name__get","parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}}],"responses":{"200":{"description":"GraphML file successfully downloaded","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"API health check","description":"Returns a 200 response to indicate the API is healthy.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BaseResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"BaseResponse"},"Body_setup_indexing_pipeline_index_post":{"properties":{"entity_extraction_prompt":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Entity Extraction Prompt"},"community_report_prompt":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Community Report Prompt"},"summarize_descriptions_prompt":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Summarize Descriptions Prompt"}},"type":"object","title":"Body_setup_indexing_pipeline_index_post"},"Body_upload_files_data_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_files_data_post"},"ClaimResponse":{"properties":{"covariate_type":{"type":"string","title":"Covariate Type"},"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"},"subject_id":{"type":"string","title":"Subject Id"},"object_id":{"type":"string","title":"Object Id"},"source_text":{"type":"string","title":"Source Text"},"text_unit_id":{"type":"string","title":"Text Unit Id"},"document_ids":{"items":{"type":"string"},"type":"array","title":"Document Ids"}},"type":"object","required":["covariate_type","type","description","subject_id","object_id","source_text","text_unit_id","document_ids"],"title":"ClaimResponse"},"EntityResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"text_units":{"items":{"type":"string"},"type":"array","title":"Text Units"}},"type":"object","required":["name","description","text_units"],"title":"EntityResponse"},"GraphRequest":{"properties":{"index_name":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Index Name"},"query":{"type":"string","title":"Query"},"community_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Community Level"}},"type":"object","required":["index_name","query"],"title":"GraphRequest"},"GraphResponse":{"properties":{"result":{"title":"Result"},"context_data":{"title":"Context Data"}},"type":"object","required":["result","context_data"],"title":"GraphResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IndexNameList":{"properties":{"index_name":{"items":{"type":"string"},"type":"array","title":"Index Name"}},"type":"object","required":["index_name"],"title":"IndexNameList"},"IndexStatusResponse":{"properties":{"status_code":{"type":"integer","title":"Status Code"},"index_name":{"type":"string","title":"Index Name"},"storage_name":{"type":"string","title":"Storage Name"},"status":{"type":"string","title":"Status"},"percent_complete":{"type":"number","title":"Percent Complete"},"progress":{"type":"string","title":"Progress"}},"type":"object","required":["status_code","index_name","storage_name","status","percent_complete","progress"],"title":"IndexStatusResponse"},"RelationshipResponse":{"properties":{"source":{"type":"string","title":"Source"},"source_id":{"type":"integer","title":"Source Id"},"target":{"type":"string","title":"Target"},"target_id":{"type":"integer","title":"Target Id"},"description":{"type":"string","title":"Description"},"text_units":{"items":{"type":"string"},"type":"array","title":"Text Units"}},"type":"object","required":["source","source_id","target","target_id","description","text_units"],"title":"RelationshipResponse"},"ReportResponse":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"ReportResponse"},"StorageNameList":{"properties":{"storage_name":{"items":{"type":"string"},"type":"array","title":"Storage Name"}},"type":"object","required":["storage_name"],"title":"StorageNameList"},"TextUnitResponse":{"properties":{"text":{"type":"string","title":"Text"},"source_document":{"type":"string","title":"Source Document"}},"type":"object","required":["text","source_document"],"title":"TextUnitResponse"},"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"}}}}