From a12e387e0e11831850c0b793e2b5b2481f182e82 Mon Sep 17 00:00:00 2001 From: Christoph Dinh Date: Sun, 31 Aug 2025 16:48:49 +0200 Subject: [PATCH 1/6] Update ScanHubs Documentation to reflect the latest changes --- .../_openapi/device_manager_openapi.json | 1 + docs/source/_openapi/device_openapi.json | 365 ----- .../source/_openapi/exam_manager_openapi.json | 1 + docs/source/_openapi/exam_openapi.json | 1342 ----------------- .../_openapi/mri/acquisition_openapi.json | 181 --- .../_openapi/mri/sequences_openapi.json | 517 ------- .../_openapi/patient_manager_openapi.json | 1 + .../_openapi/ui_patient_manager_openapi.json | 347 ----- .../_openapi/user_login_manager_openapi.json | 1 + .../_openapi/workflow_manager_openapi.json | 1 + docs/source/_openapi/workflow_openapi.json | 445 ------ ...{api_device.rst => api_device_manager.rst} | 2 +- .../{api_exam.rst => api_exam_manager.rst} | 2 +- docs/source/api_mri_acquisition.rst | 45 - docs/source/api_mri_sequences.rst | 45 - ...nt_manager.rst => api_patient_manager.rst} | 2 +- ...orkflow.rst => api_user_login_manager.rst} | 2 +- docs/source/api_workflow_manager.rst | 45 + docs/source/scanhub_api.rst | 12 +- 19 files changed, 59 insertions(+), 3298 deletions(-) create mode 100644 docs/source/_openapi/device_manager_openapi.json delete mode 100644 docs/source/_openapi/device_openapi.json create mode 100644 docs/source/_openapi/exam_manager_openapi.json delete mode 100644 docs/source/_openapi/exam_openapi.json delete mode 100644 docs/source/_openapi/mri/acquisition_openapi.json delete mode 100644 docs/source/_openapi/mri/sequences_openapi.json create mode 100644 docs/source/_openapi/patient_manager_openapi.json delete mode 100644 docs/source/_openapi/ui_patient_manager_openapi.json create mode 100644 docs/source/_openapi/user_login_manager_openapi.json create mode 100644 docs/source/_openapi/workflow_manager_openapi.json delete mode 100644 docs/source/_openapi/workflow_openapi.json rename docs/source/{api_device.rst => api_device_manager.rst} (97%) rename docs/source/{api_exam.rst => api_exam_manager.rst} (98%) delete mode 100644 docs/source/api_mri_acquisition.rst delete mode 100644 docs/source/api_mri_sequences.rst rename docs/source/{api_ui_patient_manager.rst => api_patient_manager.rst} (97%) rename docs/source/{api_workflow.rst => api_user_login_manager.rst} (97%) create mode 100644 docs/source/api_workflow_manager.rst diff --git a/docs/source/_openapi/device_manager_openapi.json b/docs/source/_openapi/device_manager_openapi.json new file mode 100644 index 00000000..7e7ec82e --- /dev/null +++ b/docs/source/_openapi/device_manager_openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/v1/device/health/readiness":{"get":{"tags":["health"],"summary":"Readiness","description":"Readiness health endpoint.\n\nInspects SQLAlchemy engine and checks if the device table exists.","operationId":"readiness_api_v1_device_health_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/device/":{"get":{"tags":["devices"],"summary":"Get Devices","description":"Retrieve the list of registered devices.\n\nReturns\n-------\n List[Device]: The list of registered devices.","operationId":"get_devices_api_v1_device__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DeviceOut"},"type":"array","title":"Response Get Devices Api V1 Device Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/device/{device_id}":{"get":{"tags":["devices"],"summary":"Get Device","description":"Retrieve a specific device.\n\nArgs\n-------\n device_id (str): The ID of the device.\n\nReturns\n-------\n dict: The response containing the information about the device","operationId":"get_device_api_v1_device__device_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["devices"],"summary":"Delete Device","description":"Delete a device.\n\nArgs\n-------\n device_id (str): The ID of the device.\n\nReturns\n-------\n dict: The response indicating the success or failure of the deletion.","operationId":"delete_device_api_v1_device__device_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/device/createdevice":{"post":{"tags":["devices"],"summary":"Create Device","description":"Create device database entry.\n\nOnly devices which are created by a user via this endpoint and have the device_id and device_token\nthat result from this call configured correctly can later connect and register.\n\nParameters\n----------\nrequest:\n DeviceCreationRequest to create device in Scanhub.\n Further details of the device are later provided by the device itself.\n\nReturn\n------\ndevice_token:\n the token of the device which the user should copy manually to the configuration file of the device.\n\ndevice_id:\n the id of the device, should be copied to the devices config file together with the device_token.","operationId":"create_device_api_v1_device_createdevice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCreationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/device/parameter/{device_id}":{"put":{"tags":["devices"],"summary":"Update acquisition/device parameter","description":"Update acquisition/device parameter.\n\nParameters\n----------\ndevice_id\n Id of the device to be updated\npayload\n Parameter dictionary\n\nReturns\n-------\n Parameter dictionary\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"update_device_parameter_api_v1_device_parameter__device_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/device/start_scan_via_websocket":{"post":{"tags":["devices"],"summary":"Start Scan Via Websocket","description":"Start a scan via a websocket that was already opened by the device.\n\nParameters\n----------\ndevice_task\n Details of the scan and the device to scan on.","operationId":"start_scan_via_websocket_api_v1_device_start_scan_via_websocket_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcquisitionTaskOut"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}}},"components":{"schemas":{"AcquisitionLimits":{"properties":{"patient_height":{"type":"integer","title":"Patient Height"},"patient_weight":{"type":"integer","title":"Patient Weight"},"patient_gender":{"$ref":"#/components/schemas/Gender","default":"NOT_GIVEN"},"patient_age":{"type":"integer","title":"Patient Age"}},"type":"object","required":["patient_height","patient_weight","patient_age"],"title":"AcquisitionLimits","description":"Pydantic definition of AcquisitionLimits."},"AcquisitionParameter":{"properties":{"fov_scaling":{"$ref":"#/components/schemas/XYZ"},"fov_offset":{"$ref":"#/components/schemas/XYZ"},"fov_rotation":{"$ref":"#/components/schemas/XYZ"}},"type":"object","required":["fov_scaling","fov_offset","fov_rotation"],"title":"AcquisitionParameter","description":"Pydantic definition of acquisition parameters."},"AcquisitionTaskOut":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"$ref":"#/components/schemas/TaskType"},"destination":{"type":"string","title":"Destination"},"status":{"$ref":"#/components/schemas/ItemStatus"},"progress":{"type":"integer","title":"Progress"},"is_template":{"type":"boolean","title":"Is Template"},"device_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Device Id"},"sequence_id":{"type":"string","title":"Sequence Id"},"acquisition_parameter":{"$ref":"#/components/schemas/AcquisitionParameter"},"id":{"type":"string","format":"uuid","title":"Id"},"creator":{"type":"string","title":"Creator"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"},"results":{"items":{"$ref":"#/components/schemas/ResultOut"},"type":"array","title":"Results"},"acquisition_limits":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionLimits"},{"type":"null"}]}},"type":"object","required":["name","description","task_type","destination","status","progress","is_template","sequence_id","acquisition_parameter","id","creator","datetime_created","results"],"title":"AcquisitionTaskOut","description":"Acquisition Task output model."},"DeviceCreationRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/DeviceStatus"},{"type":"null"}]}},"type":"object","required":["name","description"],"title":"DeviceCreationRequest","description":"Device registration request pydantic model.\n\n(to be sent by user first adding the device to the platform)."},"DeviceOut":{"properties":{"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"modality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modality"},"status":{"anyOf":[{"$ref":"#/components/schemas/DeviceStatus"},{"type":"null"}]},"site":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site"},"parameter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameter"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"id":{"type":"string","format":"uuid","title":"Id"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"}},"type":"object","required":["name","description","id","datetime_created"],"title":"DeviceOut","description":"Device pydantic output model."},"DeviceStatus":{"type":"string","enum":["ONLINE","OFFLINE","BUSY","ERROR"],"title":"DeviceStatus","description":"Pydantic definition of a commands."},"Gender":{"type":"string","enum":["MALE","FEMALE","OTHER","NOT_GIVEN"],"title":"Gender","description":"Pydantic definition of genders."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemStatus":{"type":"string","enum":["NEW","UPDATED","STARTED","FINISHED","ERROR","INPROGRESS"],"title":"ItemStatus","description":"Task status enum."},"ResultOut":{"properties":{"type":{"$ref":"#/components/schemas/ResultType"},"directory":{"type":"string","title":"Directory"},"files":{"items":{"type":"string"},"type":"array","title":"Files","default":[]},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"id":{"type":"string","format":"uuid","title":"Id"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"}},"type":"object","required":["type","directory","task_id","id","datetime_created"],"title":"ResultOut","description":"Result output model."},"ResultType":{"type":"string","enum":["DICOM","MRD","NUMPY","CALIBRATION","NOT_SET"],"title":"ResultType","description":"Result type enum."},"TaskType":{"type":"string","enum":["ACQUISITION","DAG","RECONSTRUCTION","PROCESSING"],"title":"TaskType","description":"Task type enum."},"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"},"XYZ":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"z":{"type":"number","title":"Z"}},"type":"object","required":["x","y","z"],"title":"XYZ","description":"Pydantic definition of coordinates."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"login"}}}}}} \ No newline at end of file diff --git a/docs/source/_openapi/device_openapi.json b/docs/source/_openapi/device_openapi.json deleted file mode 100644 index 9341664a..00000000 --- a/docs/source/_openapi/device_openapi.json +++ /dev/null @@ -1,365 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "paths": { - "/api/v1/device/health/readiness": { - "get": { - "tags": [ - "health" - ], - "summary": "Readiness", - "description": "Readiness health endpoint.\n\nInspects sqlalchemy engine and check if workflow table exists.\n\nReturns\n-------\n Status docstring\n\nRaises\n------\nHTTPException\n 500: Workflow table not found", - "operationId": "readiness_api_v1_device_health_readiness_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/device/": { - "get": { - "tags": [ - "devices" - ], - "summary": "Get Devices", - "description": "Get all devices endpoint.\n\nReturns\n-------\n List of device pydantic output models", - "operationId": "get_devices_api_v1_device__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Devices Api V1 Device Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceOut" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "devices" - ], - "summary": "Create Device", - "description": "Create new device endpoint.\n\nParameters\n----------\npayload\n Device pydantic base model\n\nReturns\n-------\n Device pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful", - "operationId": "create_device_api_v1_device__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDevice" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/device/{device_id}": { - "get": { - "tags": [ - "devices" - ], - "summary": "Get Device", - "description": "Get device endpoint.\n\nParameters\n----------\ndevice_id\n Id of requested device\n\nReturns\n-------\n Device pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "get_device_api_v1_device__device_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Device Id", - "type": "integer" - }, - "name": "device_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "devices" - ], - "summary": "Update Device", - "description": "Update device endpoint.\n\nParameters\n----------\ndevice_id\n Id of device to be updated\npayload\n New device pydantic base model, contains new data\n\nReturns\n-------\n Updated device pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "update_device_api_v1_device__device_id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Device Id", - "type": "integer" - }, - "name": "device_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDevice" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "devices" - ], - "summary": "Delete Device", - "description": "Delete device endpoint.\n\nParameters\n----------\ndevice_id\n Id of device to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "delete_device_api_v1_device__device_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Device Id", - "type": "integer" - }, - "name": "device_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "BaseDevice": { - "title": "BaseDevice", - "required": [ - "name", - "manufacturer", - "modality", - "status", - "ip_address" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "manufacturer": { - "title": "Manufacturer", - "type": "string" - }, - "modality": { - "title": "Modality", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "site": { - "title": "Site", - "type": "string" - }, - "ip_address": { - "title": "Ip Address", - "type": "string" - } - }, - "description": "Device pydantic base model." - }, - "DeviceOut": { - "title": "DeviceOut", - "required": [ - "name", - "manufacturer", - "modality", - "status", - "ip_address", - "id", - "datetime_created" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "manufacturer": { - "title": "Manufacturer", - "type": "string" - }, - "modality": { - "title": "Modality", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "site": { - "title": "Site", - "type": "string" - }, - "ip_address": { - "title": "Ip Address", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - } - }, - "description": "Device pydantic output model." - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/docs/source/_openapi/exam_manager_openapi.json b/docs/source/_openapi/exam_manager_openapi.json new file mode 100644 index 00000000..e388a583 --- /dev/null +++ b/docs/source/_openapi/exam_manager_openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/v1/exam/health/readiness":{"get":{"tags":["health"],"summary":"Readiness","description":"Get status / health endpoint.","operationId":"readiness_api_v1_exam_health_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/exam/new":{"post":{"tags":["exams"],"summary":"Create Exam","description":"Create a new exam.\n\nParameters\n----------\npayload\n Exam pydantic input model.\n\nReturns\n-------\n Exam pydantic output moddel.\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_exam_api_v1_exam_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseExam"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/":{"post":{"tags":["exams"],"summary":"Create Exam From Template","description":"Create a new exam from template.\n\nParameters\n----------\npayload\n The potentially modified exam to create.\ntemplate_id\n ID of the template, the exam is created from\n\nReturns\n-------\n Exam pydantic output model.\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_exam_from_template_api_v1_exam__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseExam"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/{exam_id}":{"get":{"tags":["exams"],"summary":"Get Exam","description":"Get exam endpoint.\n\nParameters\n----------\nexam_id\n Id of requested exam entry\n\nReturns\n-------\n Exam pydantic output model.\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"get_exam_api_v1_exam__exam_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Exam Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["exams"],"summary":"Exam Delete","description":"Delete an exam by id. Cascade deletes the associated workflow and tasks.\n\nParameters\n----------\nexam_id\n Id of the exam to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"exam_delete_api_v1_exam__exam_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Exam Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["exams"],"summary":"Update Exam","description":"Update an existing exam.\n\nParameters\n----------\nexam_id\n Id of the exam to be updated\npayload\n Exam pydantic input model\n\nReturns\n-------\n Exam pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"update_exam_api_v1_exam__exam_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Exam Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseExam"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/all/{patient_id}":{"get":{"tags":["exams"],"summary":"Get All Patient Exams","description":"Get all exams of a certain patient.\n\nParameters\n----------\npatient_id\n Id of parent\n\nReturns\n-------\n List of exam pydantic output models","operationId":"get_all_patient_exams_api_v1_exam_all__patient_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExamOut"},"title":"Response Get All Patient Exams Api V1 Exam All Patient Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/templates/all":{"get":{"tags":["exams"],"summary":"Get All Exam Templates","description":"Get all exam templates.\n\nReturns\n-------\n List of exam pydantic output models","operationId":"get_all_exam_templates_api_v1_exam_templates_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExamOut"},"type":"array","title":"Response Get All Exam Templates Api V1 Exam Templates All Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/workflow/new":{"post":{"tags":["workflows"],"summary":"Create Workflow","description":"Create new workflow.\n\nParameters\n----------\npayload\n Workflow pydantic input model\n\nReturns\n-------\n Workflow pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_workflow_api_v1_exam_workflow_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseWorkflow"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/workflow":{"post":{"tags":["workflows"],"summary":"Create Workflow From Template","description":"Create new workflow from template.\n\nParameters\n----------\nexam_id\n Id of the exam, the workflow is related to\ntemplate_id\n ID of the template, the workflow is created from\nnew_workflow_is_template\n set the is_template property of the new workflow and its tasks\n\nReturns\n-------\n Workflow pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_workflow_from_template_api_v1_exam_workflow_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Exam Id"}},{"name":"template_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"new_workflow_is_template","in":"query","required":true,"schema":{"type":"boolean","title":"New Workflow Is Template"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/workflow/{workflow_id}":{"get":{"tags":["workflows"],"summary":"Get Workflow","description":"Get a workflow.\n\nParameters\n----------\nworkflow_id\n Id of the workflow to be returned\n\nReturns\n-------\n Workflow pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"get_workflow_api_v1_exam_workflow__workflow_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Delete Workflow","description":"Delete a workflow. Cascade delete the associated tasks.\n\nParameters\n----------\nworkflow_id\n Id of the workflow to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"delete_workflow_api_v1_exam_workflow__workflow_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Workflow Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workflows"],"summary":"Update Workflow","description":"Update an existing workflow.\n\nParameters\n----------\nworkflow_id\n Id of the workflow to be updated\npayload\n Workflow pydantic indput model\n\nReturns\n-------\n Workflow pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"update_workflow_api_v1_exam_workflow__workflow_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseWorkflow"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/workflow/all/{exam_id}":{"get":{"tags":["workflows"],"summary":"Get All Exam Workflows","description":"Get all existing workflows of a certain exam.\n\nParameters\n----------\nexam_id\n Id of parent exam\n\nReturns\n-------\n List of workflow pydantic output model","operationId":"get_all_exam_workflows_api_v1_exam_workflow_all__exam_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Exam Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowOut"},"title":"Response Get All Exam Workflows Api V1 Exam Workflow All Exam Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/workflow/templates/all":{"get":{"tags":["workflows"],"summary":"Get All Workflow Templates","description":"Get all workflow templates.\n\nReturns\n-------\n List of workflow pydantic output model","operationId":"get_all_workflow_templates_api_v1_exam_workflow_templates_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowOut"},"type":"array","title":"Response Get All Workflow Templates Api V1 Exam Workflow Templates All Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/task/new":{"post":{"tags":["tasks"],"summary":"Create Task","description":"Create a new task.\n\nParameters\n----------\npayload\n Task pydantic input model\n\nReturns\n-------\n Task pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_task_api_v1_exam_task_new_post","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BaseAcquisitionTask"},{"$ref":"#/components/schemas/BaseDAGTask"}],"title":"Payload","discriminator":{"propertyName":"task_type","mapping":{"ACQUISITION":"#/components/schemas/BaseAcquisitionTask","DAG":"#/components/schemas/BaseDAGTask"}}}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}],"title":"Response Create Task Api V1 Exam Task New Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/task":{"post":{"tags":["tasks"],"summary":"Create Task From Template","description":"Create a new task from template.\n\nParameters\n----------\nworkflow_id\n ID of the workflow, the task is related to\ntemplate_id\n ID of the template, the task is created from\nnew_task_is_template\n set the is_template property on the new task\n\nReturns\n-------\n Task pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_task_from_template_api_v1_exam_task_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"template_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"new_task_is_template","in":"query","required":true,"schema":{"type":"boolean","title":"New Task Is Template"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}],"title":"Response Create Task From Template Api V1 Exam Task Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/task/{task_id}":{"get":{"tags":["tasks"],"summary":"Get Task","description":"Get an existing task.\n\nParameters\n----------\ntask_id\n Id of the task to be returned\n\nReturns\n-------\n Task pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"get_task_api_v1_exam_task__task_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}],"title":"Response Get Task Api V1 Exam Task Task Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tasks"],"summary":"Delete Task","description":"Delete a task.\n\nParameters\n----------\ntask_id\n Id of the task to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"delete_task_api_v1_exam_task__task_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tasks"],"summary":"Update Task","description":"Update an existing task.\n\nParameters\n----------\ntask_id\n Id of the workflow to be updated\npayload\n Task pydantic base model\n\nReturns\n-------\n Task pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"update_task_api_v1_exam_task__task_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BaseAcquisitionTask"},{"$ref":"#/components/schemas/BaseDAGTask"}],"discriminator":{"propertyName":"task_type","mapping":{"ACQUISITION":"#/components/schemas/BaseAcquisitionTask","DAG":"#/components/schemas/BaseDAGTask"}},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}],"title":"Response Update Task Api V1 Exam Task Task Id Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/task/all/{workflow_id}":{"get":{"tags":["tasks"],"summary":"Get All Workflow Tasks","description":"Get all existing tasks of a certain workflow.\n\nParameters\n----------\nworkflow_id\n Id of parental workflow\n\nReturns\n-------\n List of task pydantic output model","operationId":"get_all_workflow_tasks_api_v1_exam_task_all__workflow_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}]},"title":"Response Get All Workflow Tasks Api V1 Exam Task All Workflow Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/task/templates/all":{"get":{"tags":["tasks"],"summary":"Get All Task Templates","description":"Get all existing task templates.\n\nReturns\n-------\n List of task pydantic output model","operationId":"get_all_task_templates_api_v1_exam_task_templates_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}]},"type":"array","title":"Response Get All Task Templates Api V1 Exam Task Templates All Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/result":{"post":{"tags":["results"],"summary":"Create Blank Result","description":"Create a task result.\n\nParameters\n----------\npayload\n Result pydantic input model\n\nReturns\n-------\n Result pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful","operationId":"create_blank_result_api_v1_exam_result_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Task Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/result/{result_id}":{"get":{"tags":["results"],"summary":"Get Result","description":"Get an existing result.\n\nParameters\n----------\nresult_id\n Id of the result to be returned\n\nReturns\n-------\n Result pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"get_result_api_v1_exam_result__result_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"result_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["results"],"summary":"Delete Result","description":"Delete a task.\n\nParameters\n----------\ntask_id\n Id of the task to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"delete_result_api_v1_exam_result__result_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"result_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Result Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["results"],"summary":"Set Result","description":"Update an existing result.\n\nParameters\n----------\nresult_id\n Id of the result to be updated\npayload\n Result pydantic base model/dict\n If this is the pydantic ResultBase model, only fields in the base model can be updated.\n\nReturns\n-------\n Task pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"set_result_api_v1_exam_result__result_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"result_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Result Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetResult"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/result/all/{task_id}":{"get":{"tags":["results"],"summary":"Get All Task Results","description":"Get all existing results of a certain task.\n\nParameters\n----------\ntask_id\n Id of parental task\n\nReturns\n-------\n List of task pydantic output model","operationId":"get_all_task_results_api_v1_exam_result_all__task_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResultOut"},"title":"Response Get All Task Results Api V1 Exam Result All Task Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/dcm/{workflow_id}/{task_id}/{result_id}/{filename}":{"get":{"tags":["results","data"],"summary":"Get DICOM result","description":"Serve a DICOM instance.\n\n - If it's already a DICOM Part-10 file → return FileResponse (supports HTTP Range).\n - Else → convert to Part-10 in memory and return StreamingResponse.\n\nHeaders:\n - 'application/dicom' content type\n - inline disposition (avoid forced download)\n - 'Cache-Control: no-transform' to prevent proxies from gzipping (which breaks Range offsets)","operationId":"get-dicom","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"result_id","in":"path","required":true,"schema":{"type":"string","title":"Result Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/dicom":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/mrd/{workflow_id}/{task_id}/{result_id}/meta":{"get":{"tags":["results","data"],"summary":"Get ISMRMRD metadata (indexed acquisitions)","description":"Get MRD meta info.","operationId":"get-mrd-meta","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"result_id","in":"path","required":true,"schema":{"type":"string","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MRDMetaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/mrd/{workflow_id}/{task_id}/{result_id}/data":{"get":{"tags":["results","data"],"summary":"Get MRD (binary, interleaved float32 complex)","description":"Get MRD as binary stream.","operationId":"getMRD","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"result_id","in":"path","required":true,"schema":{"type":"string","title":"Result Id"}},{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"IDs: '0,1,10-20,40-50:2'","title":"Ids"},"description":"IDs: '0,1,10-20,40-50:2'"},{"name":"coil_idx","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Coil index","default":0,"title":"Coil Idx"},"description":"Coil index"},{"name":"stride","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Decimate samples by stride","default":1,"title":"Stride"},"description":"Decimate samples by stride"}],"responses":{"200":{"description":"Binary packet stream with a tiny header + payload(s).","content":{"application/json":{"schema":{}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/sequence/{sequence_id}":{"get":{"tags":["mri sequences"],"summary":"Get Mri Sequence By Id","description":"Retrieve an MRI sequence by its ID.\n\nParameters\n----------\nsequence_id : str\n The ID of the MRI sequence to retrieve.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The retrieved MRI sequence.","operationId":"get_mri_sequence_by_id_api_v1_exam_sequence__sequence_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MRISequenceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["mri sequences"],"summary":"Update Mri Sequence Endpoint","description":"Update an MRI sequence with new data.\n\nParameters\n----------\nsequence_id : str\n The ID of the MRI sequence to update.\nmri_sequence : MRISequence\n The updated MRI sequence data.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The updated MRI sequence.","operationId":"update_mri_sequence_endpoint_api_v1_exam_sequence__sequence_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseMRISequence"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MRISequenceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["mri sequences"],"summary":"Delete Mri Sequence Endpoint","description":"Delete an MRI sequence by its ID.\n\nParameters\n----------\nsequence_id : str\n The ID of the MRI sequence to delete.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nNone","operationId":"delete_mri_sequence_endpoint_api_v1_exam_sequence__sequence_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/sequence":{"post":{"tags":["mri sequences"],"summary":"Create Mri Sequence","description":"Upload an MRI sequence file and store it with the provided metadata.\n\nParameters\n----------\nmri_sequence : MRISequenceCreate\n The MRI sequence metadata.\nseq_file : UploadFile\n The MRI sequence file to store.\nxml_file : UploadFile\n The ISMRMRD header xml file to store.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The stored MRI sequence with the uploaded file.","operationId":"create_mri_sequence_api_v1_exam_sequence_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_mri_sequence_api_v1_exam_sequence_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MRISequenceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/sequences/all":{"get":{"tags":["mri sequences"],"summary":"Get All Mri Sequences","description":"Retrieve a list of all MRI sequences from the database.\n\nParameters\n----------\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nList[MRISequence]\n The list of MRI sequences.","operationId":"get_all_mri_sequences_api_v1_exam_sequences_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MRISequenceOut"},"type":"array","title":"Response Get All Mri Sequences Api V1 Exam Sequences All Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/exam/sequence/{sequence_id}/file":{"get":{"tags":["mri sequences"],"summary":"Get Mri Sequence File By Id","description":"Retrieve an MRI sequence file by its ID.\n\nParameters\n----------\nsequence_id : str\n The ID of the MRI sequence to retrieve.\nbackground_tasks : BackgroundTasks\n The background tasks to run.\nname : str\n The name of the file to download.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nFileResponse\n The retrieved MRI sequence file.","operationId":"get_mri_sequence_file_by_id_api_v1_exam_sequence__sequence_id__file_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"sequence","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exam/sequence/{sequence_id}/header":{"get":{"tags":["mri sequences"],"summary":"Get Mri Sequence Header File By Id","description":"Retrieve an MRI sequence header (ISMRMRD header) file by its ID.\n\nParameters\n----------\nsequence_id : str\n The ID of the MRI sequence to retrieve.\nbackground_tasks : BackgroundTasks\n The background tasks to run.\nname : str\n The name of the file to download.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nFileResponse\n The retrieved MRI sequence file.","operationId":"get_mri_sequence_header_file_by_id_api_v1_exam_sequence__sequence_id__header_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"header","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcquisitionLimits":{"properties":{"patient_height":{"type":"integer","title":"Patient Height"},"patient_weight":{"type":"integer","title":"Patient Weight"},"patient_gender":{"$ref":"#/components/schemas/Gender","default":"NOT_GIVEN"},"patient_age":{"type":"integer","title":"Patient Age"}},"type":"object","required":["patient_height","patient_weight","patient_age"],"title":"AcquisitionLimits","description":"Pydantic definition of AcquisitionLimits."},"AcquisitionParameter":{"properties":{"fov_scaling":{"$ref":"#/components/schemas/XYZ"},"fov_offset":{"$ref":"#/components/schemas/XYZ"},"fov_rotation":{"$ref":"#/components/schemas/XYZ"}},"type":"object","required":["fov_scaling","fov_offset","fov_rotation"],"title":"AcquisitionParameter","description":"Pydantic definition of acquisition parameters."},"AcquisitionTaskOut":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"$ref":"#/components/schemas/TaskType"},"destination":{"type":"string","title":"Destination"},"status":{"$ref":"#/components/schemas/ItemStatus"},"progress":{"type":"integer","title":"Progress"},"is_template":{"type":"boolean","title":"Is Template"},"device_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Device Id"},"sequence_id":{"type":"string","title":"Sequence Id"},"acquisition_parameter":{"$ref":"#/components/schemas/AcquisitionParameter"},"id":{"type":"string","format":"uuid","title":"Id"},"creator":{"type":"string","title":"Creator"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"},"results":{"items":{"$ref":"#/components/schemas/ResultOut"},"type":"array","title":"Results"},"acquisition_limits":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionLimits"},{"type":"null"}]}},"type":"object","required":["name","description","task_type","destination","status","progress","is_template","sequence_id","acquisition_parameter","id","creator","datetime_created","results"],"title":"AcquisitionTaskOut","description":"Acquisition Task output model."},"BaseAcquisitionTask":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"type":"string","const":"ACQUISITION","title":"Task Type"},"destination":{"type":"string","title":"Destination"},"status":{"$ref":"#/components/schemas/ItemStatus"},"progress":{"type":"integer","title":"Progress"},"is_template":{"type":"boolean","title":"Is Template"},"device_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Device Id"},"sequence_id":{"type":"string","title":"Sequence Id"},"acquisition_parameter":{"$ref":"#/components/schemas/AcquisitionParameter"}},"type":"object","required":["name","description","task_type","destination","status","progress","is_template","sequence_id","acquisition_parameter"],"title":"BaseAcquisitionTask","description":"Represents a task for data acquisition in the system."},"BaseDAGTask":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"type":"string","const":"DAG","title":"Task Type"},"destination":{"type":"string","title":"Destination"},"status":{"$ref":"#/components/schemas/ItemStatus"},"progress":{"type":"integer","title":"Progress"},"is_template":{"type":"boolean","title":"Is Template"},"dag_type":{"type":"string","enum":["RECONSTRUCTION","PROCESSING"],"title":"Dag Type"},"dag_id":{"type":"string","title":"Dag Id"},"input_task_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Input Task Ids","default":[]},"parameter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameter"}},"type":"object","required":["name","description","task_type","destination","status","progress","is_template","dag_type","dag_id"],"title":"BaseDAGTask","description":"Workflow task model."},"BaseExam":{"properties":{"patient_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Patient Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"indication":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indication"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"status":{"$ref":"#/components/schemas/ItemStatus"},"is_template":{"type":"boolean","title":"Is Template"}},"type":"object","required":["name","description","status","is_template"],"title":"BaseExam","description":"Exam base model."},"BaseMRISequence":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"sequence_type":{"type":"string","title":"Sequence Type"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["name","description","sequence_type"],"title":"BaseMRISequence","description":"Base model for MRI sequence."},"BaseWorkflow":{"properties":{"exam_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Exam Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"status":{"$ref":"#/components/schemas/ItemStatus"},"is_template":{"type":"boolean","title":"Is Template"}},"type":"object","required":["name","description","status","is_template"],"title":"BaseWorkflow","description":"Workflow base model."},"Body_create_mri_sequence_api_v1_exam_sequence_post":{"properties":{"seq_file":{"type":"string","format":"binary","title":"Seq File"},"xml_file":{"type":"string","format":"binary","title":"Xml File"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"sequence_type":{"type":"string","title":"Sequence Type","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["seq_file","xml_file","name"],"title":"Body_create_mri_sequence_api_v1_exam_sequence_post"},"DAGTaskOut":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"$ref":"#/components/schemas/TaskType"},"destination":{"type":"string","title":"Destination"},"status":{"$ref":"#/components/schemas/ItemStatus"},"progress":{"type":"integer","title":"Progress"},"is_template":{"type":"boolean","title":"Is Template"},"dag_type":{"type":"string","enum":["RECONSTRUCTION","PROCESSING"],"title":"Dag Type"},"dag_id":{"type":"string","title":"Dag Id"},"input_task_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Input Task Ids","default":[]},"parameter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameter"},"id":{"type":"string","format":"uuid","title":"Id"},"creator":{"type":"string","title":"Creator"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"},"results":{"items":{"$ref":"#/components/schemas/ResultOut"},"type":"array","title":"Results"}},"type":"object","required":["name","description","task_type","destination","status","progress","is_template","dag_type","dag_id","id","creator","datetime_created","results"],"title":"DAGTaskOut","description":"Workflow Task output model."},"ExamOut":{"properties":{"patient_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Patient Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"indication":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indication"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"status":{"$ref":"#/components/schemas/ItemStatus"},"is_template":{"type":"boolean","title":"Is Template"},"id":{"type":"string","format":"uuid","title":"Id"},"creator":{"type":"string","title":"Creator"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"},"workflows":{"items":{"$ref":"#/components/schemas/WorkflowOut"},"type":"array","title":"Workflows"}},"type":"object","required":["name","description","status","is_template","id","creator","datetime_created","workflows"],"title":"ExamOut","description":"Exam output model."},"Gender":{"type":"string","enum":["MALE","FEMALE","OTHER","NOT_GIVEN"],"title":"Gender","description":"Pydantic definition of genders."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemStatus":{"type":"string","enum":["NEW","UPDATED","STARTED","FINISHED","ERROR","INPROGRESS"],"title":"ItemStatus","description":"Task status enum."},"MRDAcquisitionInfo":{"properties":{"acquisition_id":{"type":"integer","minimum":0.0,"title":"Acquisition Id"},"num_samples":{"type":"integer","minimum":1.0,"title":"Num Samples"},"num_coils":{"type":"integer","minimum":1.0,"title":"Num Coils"},"dwell_time":{"type":"number","title":"Dwell Time"}},"type":"object","required":["acquisition_id","num_samples","num_coils","dwell_time"],"title":"MRDAcquisitionInfo","description":"ISMRM raw data / (ISMR)MRD acquisition info."},"MRDMetaResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"task_id":{"type":"string","title":"Task Id"},"result_id":{"type":"string","title":"Result Id"},"dtype":{"type":"string","title":"Dtype","default":"fc32"},"acquisitions":{"items":{"$ref":"#/components/schemas/MRDAcquisitionInfo"},"type":"array","title":"Acquisitions","default":[]}},"type":"object","required":["workflow_id","task_id","result_id"],"title":"MRDMetaResponse","description":"ISMRM raw data / (ISMR)MRD meta data response."},"MRISequenceOut":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"sequence_type":{"type":"string","title":"Sequence Type"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"_id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"seq_file":{"title":"Seq File"},"seq_file_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seq File Extension"},"xml_file":{"anyOf":[{},{"type":"null"}],"title":"Xml File"},"xml_file_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xml File Extension"}},"type":"object","required":["name","description","sequence_type","_id","created_at","seq_file"],"title":"MRISequenceOut","description":"Output model for MRI sequence."},"ResultOut":{"properties":{"type":{"$ref":"#/components/schemas/ResultType"},"directory":{"type":"string","title":"Directory"},"files":{"items":{"type":"string"},"type":"array","title":"Files","default":[]},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"id":{"type":"string","format":"uuid","title":"Id"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"}},"type":"object","required":["type","directory","task_id","id","datetime_created"],"title":"ResultOut","description":"Result output model."},"ResultType":{"type":"string","enum":["DICOM","MRD","NUMPY","CALIBRATION","NOT_SET"],"title":"ResultType","description":"Result type enum."},"SetResult":{"properties":{"type":{"$ref":"#/components/schemas/ResultType"},"directory":{"type":"string","title":"Directory"},"files":{"items":{"type":"string"},"type":"array","title":"Files","default":[]},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["type","directory"],"title":"SetResult","description":"Update result model."},"TaskType":{"type":"string","enum":["ACQUISITION","DAG","RECONSTRUCTION","PROCESSING"],"title":"TaskType","description":"Task type enum."},"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"},"WorkflowOut":{"properties":{"exam_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Exam Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"status":{"$ref":"#/components/schemas/ItemStatus"},"is_template":{"type":"boolean","title":"Is Template"},"id":{"type":"string","format":"uuid","title":"Id"},"creator":{"type":"string","title":"Creator"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"},"tasks":{"items":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionTaskOut"},{"$ref":"#/components/schemas/DAGTaskOut"}]},"type":"array","title":"Tasks"}},"type":"object","required":["name","description","status","is_template","id","creator","datetime_created","tasks"],"title":"WorkflowOut","description":"Workflow output model."},"XYZ":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"z":{"type":"number","title":"Z"}},"type":"object","required":["x","y","z"],"title":"XYZ","description":"Pydantic definition of coordinates."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"login"}}}}}} \ No newline at end of file diff --git a/docs/source/_openapi/exam_openapi.json b/docs/source/_openapi/exam_openapi.json deleted file mode 100644 index ac25eb01..00000000 --- a/docs/source/_openapi/exam_openapi.json +++ /dev/null @@ -1,1342 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "paths": { - "/api/v1/exam/": { - "post": { - "tags": [ - "exams" - ], - "summary": "Exam Create", - "description": "Create exam endpoint.\n\nParameters\n----------\npayload\n Exam pydantic input model.\n\nReturns\n-------\n Exam pydantic output moddel.\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful", - "operationId": "exam_create_api_v1_exam__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseExam" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExamOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/{exam_id}": { - "get": { - "tags": [ - "exams" - ], - "summary": "Exam Get", - "description": "Get exam endpoint.\n\nParameters\n----------\nexam_id\n Id of requested exam entry\n\nReturns\n-------\n Exam pydantic output model.\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "exam_get_api_v1_exam__exam_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Exam Id", - "type": "integer" - }, - "name": "exam_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExamOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "exams" - ], - "summary": "Exam Update", - "description": "Update exam.\n\nParameters\n----------\nexam_id\n Id of the exam to be updated\npayload\n Exam pydantic input model\n\nReturns\n-------\n Exam pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "exam_update_api_v1_exam__exam_id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Exam Id", - "type": "integer" - }, - "name": "exam_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseExam" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExamOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "exams" - ], - "summary": "Exam Delete", - "description": "Delete exam by id.\n\nParameters\n----------\nexam_id\n Id of the exam to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "exam_delete_api_v1_exam__exam_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Exam Id", - "type": "integer" - }, - "name": "exam_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/all/{patient_id}": { - "get": { - "tags": [ - "exams" - ], - "summary": "Exam Get All", - "description": "Get all exams of a patient endpoint.\n\nParameters\n----------\npatient_id\n Id of parent\n\nReturns\n-------\n List of exam pydantic output models", - "operationId": "exam_get_all_api_v1_exam_all__patient_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Patient Id", - "type": "integer" - }, - "name": "patient_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Exam Get All Api V1 Exam All Patient Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/ExamOut" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/procedure": { - "post": { - "tags": [ - "procedures" - ], - "summary": "Procedure Create", - "description": "Procedure post endpoint.\n\nParameters\n----------\npayload\n Pydantic input model\n\nReturns\n-------\n Pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation not succesful", - "operationId": "procedure_create_api_v1_exam_procedure_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcedureIn" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcedureOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/procedure/{procedure_id}": { - "get": { - "tags": [ - "procedures" - ], - "summary": "Procedure Get", - "description": "Procedure get endpoint.\n\nParameters\n----------\nprocedure_id\n Id of entry to return\n\nReturns\n-------\n Pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "procedure_get_api_v1_exam_procedure__procedure_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Procedure Id", - "type": "integer" - }, - "name": "procedure_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcedureOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "procedures" - ], - "summary": "Proceedure Update", - "description": "Update procedure endpoint.\n\nParameters\n----------\nprocedure_id\n Id of procedure to be updated\npayload\n Pydantic input model\n\nReturns\n-------\n Pydantic output model\n\nRaises\n------\nHTTPException\n 404: Entry not found", - "operationId": "proceedure_update_api_v1_exam_procedure__procedure_id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Procedure Id", - "type": "integer" - }, - "name": "procedure_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcedureIn" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcedureOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "procedures" - ], - "summary": "Procedure Delete", - "description": "Delete procedure endpoint.\n\nParameters\n----------\nprocedure_id\n Id of entry to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "procedure_delete_api_v1_exam_procedure__procedure_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Procedure Id", - "type": "integer" - }, - "name": "procedure_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/procedure/all/{exam_id}": { - "get": { - "tags": [ - "procedures" - ], - "summary": "Procedure Get All", - "description": "Get all procedures of a parent endpoint.\n\nParameters\n----------\nexam_id\n Id of the parent object\n\nReturns\n-------\n List of pydantic output models", - "operationId": "procedure_get_all_api_v1_exam_procedure_all__exam_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Exam Id", - "type": "integer" - }, - "name": "exam_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Procedure Get All Api V1 Exam Procedure All Exam Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/ProcedureOut" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/job": { - "post": { - "tags": [ - "jobs" - ], - "summary": "Job Create", - "description": "Create new job endpoint.\n\nParameters\n----------\npayload\n Job pydantic input model\n\nReturns\n-------\n Job pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful", - "operationId": "job_create_api_v1_exam_job_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseJob" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/job/{job_id}": { - "get": { - "tags": [ - "jobs" - ], - "summary": "Job Get", - "description": "Get job endpoint.\n\nParameters\n----------\njob_id\n Id of the job to be returned\n\nReturns\n-------\n Job pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "job_get_api_v1_exam_job__job_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Job Id", - "type": "integer" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "jobs" - ], - "summary": "Job Update", - "description": "Update job endpoint.\n\nParameters\n----------\njob_id\n Id of the job to be updated\npayload\n Job pydantic indput model\n\nReturns\n-------\n Job pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "job_update_api_v1_exam_job__job_id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Job Id", - "type": "integer" - }, - "name": "job_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseJob" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "jobs" - ], - "summary": "Job Delete", - "description": "Delete job endpoint.\n\nParameters\n----------\njob_id\n Id of the job to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "job_delete_api_v1_exam_job__job_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Job Id", - "type": "integer" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/job/all/{procedure_id}": { - "get": { - "tags": [ - "jobs" - ], - "summary": "Job Get All", - "description": "Get all jobs of a procedure endpoint.\n\nParameters\n----------\nprocedure_id\n Id of parent procedure\n\nReturns\n-------\n List of job pydantic output model", - "operationId": "job_get_all_api_v1_exam_job_all__procedure_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Procedure Id", - "type": "integer" - }, - "name": "procedure_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Job Get All Api V1 Exam Job All Procedure Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/JobOut" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/record": { - "post": { - "tags": [ - "records" - ], - "summary": "Record Create", - "description": "Create record endpoint.\n\nParameters\n----------\npayload\n Record pydantic input model\n\nReturns\n-------\n Record pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful", - "operationId": "record_create_api_v1_exam_record_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordIn" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/record/{record_id}": { - "get": { - "tags": [ - "records" - ], - "summary": "Record Get", - "description": "Get single record endpoint.\n\nParameters\n----------\nrecord_id\n Id of the record to return\n\nReturns\n-------\n Record pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "record_get_api_v1_exam_record__record_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Record Id", - "type": "integer" - }, - "name": "record_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "records" - ], - "summary": "Record Delete", - "description": "Delete record endpoint.\n\nParameters\n----------\nrecord_id\n Id of the record to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "record_delete_api_v1_exam_record__record_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Record Id", - "type": "integer" - }, - "name": "record_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/record/all/{job_id}": { - "get": { - "tags": [ - "records" - ], - "summary": "Record Get All", - "description": "Get all records of a job endpoint.\n\nParameters\n----------\njob_id\n Id of parental job\n\nReturns\n-------\n List of record pydantic output model", - "operationId": "record_get_all_api_v1_exam_record_all__job_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Job Id", - "type": "integer" - }, - "name": "job_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Record Get All Api V1 Exam Record All Job Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/RecordOut" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/exam/health/readiness": { - "get": { - "tags": [ - "health" - ], - "summary": "Readiness", - "description": "Readiness health endpoint.\n\nReturns\n-------\n Status dictionary\n\nRaises\n------\nHTTPException\n 500: Any of the exam-tree tables does not exist", - "operationId": "readiness_api_v1_exam_health_readiness_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - } - }, - "components": { - "schemas": { - "BaseExam": { - "title": "BaseExam", - "required": [ - "patient_id", - "name", - "creator", - "status" - ], - "type": "object", - "properties": { - "patient_id": { - "title": "Patient Id", - "type": "integer" - }, - "name": { - "title": "Name", - "type": "string" - }, - "country": { - "title": "Country", - "type": "string" - }, - "site": { - "title": "Site", - "type": "string" - }, - "address": { - "title": "Address", - "type": "string" - }, - "creator": { - "title": "Creator", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - } - }, - "description": "Exam base model." - }, - "BaseJob": { - "title": "BaseJob", - "required": [ - "type", - "procedure_id", - "sequence_id", - "device_id" - ], - "type": "object", - "properties": { - "type": { - "title": "Type", - "type": "string" - }, - "comment": { - "title": "Comment", - "type": "string" - }, - "procedure_id": { - "title": "Procedure Id", - "type": "integer" - }, - "sequence_id": { - "title": "Sequence Id", - "type": "string" - }, - "workflow_id": { - "title": "Workflow Id", - "type": "integer" - }, - "device_id": { - "title": "Device Id", - "type": "integer" - } - }, - "description": "Job base model." - }, - "DeviceOut": { - "title": "DeviceOut", - "required": [ - "name", - "manufacturer", - "modality", - "status", - "ip_address", - "id", - "datetime_created" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "manufacturer": { - "title": "Manufacturer", - "type": "string" - }, - "modality": { - "title": "Modality", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "site": { - "title": "Site", - "type": "string" - }, - "ip_address": { - "title": "Ip Address", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - } - }, - "description": "Devicee output model." - }, - "ExamOut": { - "title": "ExamOut", - "required": [ - "patient_id", - "name", - "creator", - "status", - "id", - "datetime_created", - "procedures" - ], - "type": "object", - "properties": { - "patient_id": { - "title": "Patient Id", - "type": "integer" - }, - "name": { - "title": "Name", - "type": "string" - }, - "country": { - "title": "Country", - "type": "string" - }, - "site": { - "title": "Site", - "type": "string" - }, - "address": { - "title": "Address", - "type": "string" - }, - "creator": { - "title": "Creator", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - }, - "procedures": { - "title": "Procedures", - "type": "array", - "items": { - "$ref": "#/components/schemas/ProcedureOut" - } - } - }, - "description": "Exam output model." - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "JobOut": { - "title": "JobOut", - "required": [ - "type", - "procedure_id", - "sequence_id", - "device_id", - "id", - "is_acquired", - "records", - "datetime_created" - ], - "type": "object", - "properties": { - "type": { - "title": "Type", - "type": "string" - }, - "comment": { - "title": "Comment", - "type": "string" - }, - "procedure_id": { - "title": "Procedure Id", - "type": "integer" - }, - "sequence_id": { - "title": "Sequence Id", - "type": "string" - }, - "workflow_id": { - "title": "Workflow Id", - "type": "integer" - }, - "device_id": { - "title": "Device Id", - "type": "integer" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "is_acquired": { - "title": "Is Acquired", - "type": "boolean" - }, - "device": { - "$ref": "#/components/schemas/DeviceOut" - }, - "workflow": { - "$ref": "#/components/schemas/WorkflowOut" - }, - "records": { - "title": "Records", - "type": "array", - "items": { - "$ref": "#/components/schemas/RecordOut" - } - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - } - }, - "description": "Job output model." - }, - "ProcedureIn": { - "title": "ProcedureIn", - "required": [ - "name", - "status", - "exam_id" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "exam_id": { - "title": "Exam Id", - "type": "integer" - } - }, - "description": "Procedure input model." - }, - "ProcedureOut": { - "title": "ProcedureOut", - "required": [ - "name", - "status", - "id", - "datetime_created", - "jobs" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - }, - "jobs": { - "title": "Jobs", - "type": "array", - "items": { - "$ref": "#/components/schemas/JobOut" - } - } - }, - "description": "Procedure output model." - }, - "RecordIn": { - "title": "RecordIn", - "required": [ - "job_id" - ], - "type": "object", - "properties": { - "data_path": { - "title": "Data Path", - "type": "string" - }, - "comment": { - "title": "Comment", - "type": "string" - }, - "job_id": { - "title": "Job Id", - "type": "integer" - } - }, - "description": "Record input model." - }, - "RecordOut": { - "title": "RecordOut", - "required": [ - "id", - "datetime_created" - ], - "type": "object", - "properties": { - "data_path": { - "title": "Data Path", - "type": "string" - }, - "comment": { - "title": "Comment", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - } - }, - "description": "Record output model." - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - }, - "WorkflowOut": { - "title": "WorkflowOut", - "required": [ - "host", - "name", - "manufacturer", - "modality", - "type", - "status", - "kafka_topic", - "id", - "datetime_created" - ], - "type": "object", - "properties": { - "host": { - "title": "Host", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "manufacturer": { - "title": "Manufacturer", - "type": "string" - }, - "modality": { - "title": "Modality", - "type": "string" - }, - "type": { - "title": "Type", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "kafka_topic": { - "title": "Kafka Topic", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - } - }, - "description": "Workflow output model." - } - } - } -} \ No newline at end of file diff --git a/docs/source/_openapi/mri/acquisition_openapi.json b/docs/source/_openapi/mri/acquisition_openapi.json deleted file mode 100644 index c3811df3..00000000 --- a/docs/source/_openapi/mri/acquisition_openapi.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "paths": { - "/api/v1/mri/acquisitioncontrol/start-scan": { - "post": { - "summary": "Start Scan", - "description": "Receives a job. Create a record id, trigger scan with it and returns it.", - "operationId": "start_scan_api_v1_mri_acquisitioncontrol_start_scan_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScanJob" - } - } - }, - "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/mri/acquisitioncontrol/forward-status": { - "post": { - "summary": "Forward Status", - "description": "Receives status for a job. Forwards it to the ui and returns ok.", - "operationId": "forward_status_api_v1_mri_acquisitioncontrol_forward_status_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScanStatus" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "ScanJob": { - "title": "ScanJob", - "required": [ - "id", - "sequence_id", - "workflow_id", - "device_id" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "integer" - }, - "sequence_id": { - "title": "Sequence Id", - "type": "string" - }, - "workflow_id": { - "title": "Workflow Id", - "type": "integer" - }, - "device_id": { - "title": "Device Id", - "type": "integer" - } - }, - "description": "Pydantic model definition of a scanjob." - }, - "ScanStatus": { - "title": "ScanStatus", - "required": [ - "record_id", - "status_percent" - ], - "type": "object", - "properties": { - "record_id": { - "title": "Record Id", - "type": "string" - }, - "status_percent": { - "title": "Status Percent", - "type": "integer" - } - }, - "description": "Pydantic definition of a scanjob." - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/docs/source/_openapi/mri/sequences_openapi.json b/docs/source/_openapi/mri/sequences_openapi.json deleted file mode 100644 index 2c4b166d..00000000 --- a/docs/source/_openapi/mri/sequences_openapi.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "paths": { - "/api/v1/mri/sequences/": { - "get": { - "tags": [ - "MRI Sequences" - ], - "summary": "Get Mri Sequences Endpoint", - "description": "Retrieve a list of all MRI sequences from the database.\n\nParameters\n----------\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nList[MRISequence]\n The list of MRI sequences.", - "operationId": "get_mri_sequences_endpoint_api_v1_mri_sequences__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Mri Sequences Endpoint Api V1 Mri Sequences Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/MRISequence" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "MRI Sequences" - ], - "summary": "Create Mri Sequence Endpoint", - "description": "Create a new MRI sequence and store it in the database.\n\nParameters\n----------\nmri_sequence : MRISequence\n The MRI sequence data to store.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The created MRI sequence.", - "operationId": "create_mri_sequence_endpoint_api_v1_mri_sequences__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MRISequence" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MRISequence" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/mri/sequences/upload": { - "post": { - "tags": [ - "MRI Sequences" - ], - "summary": "Upload Mri Sequence File", - "description": "Upload an MRI sequence file and store it with the provided metadata.\n\nParameters\n----------\nmri_sequence : MRISequenceCreate\n The MRI sequence metadata.\nfile : UploadFile\n The MRI sequence file to store.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The stored MRI sequence with the uploaded file.", - "operationId": "upload_mri_sequence_file_api_v1_mri_sequences_upload_post", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_upload_mri_sequence_file_api_v1_mri_sequences_upload_post" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MRISequence" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/mri/sequences/{mri_sequence_id}": { - "get": { - "tags": [ - "MRI Sequences" - ], - "summary": "Get Mri Sequence By Id Endpoint", - "description": "Retrieve an MRI sequence by its ID.\n\nParameters\n----------\nmri_sequence_id : str\n The ID of the MRI sequence to retrieve.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The retrieved MRI sequence.", - "operationId": "get_mri_sequence_by_id_endpoint_api_v1_mri_sequences__mri_sequence_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Mri Sequence Id", - "type": "string" - }, - "name": "mri_sequence_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MRISequence" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "MRI Sequences" - ], - "summary": "Update Mri Sequence Endpoint", - "description": "Update an MRI sequence with new data.\n\nParameters\n----------\nmri_sequence_id : str\n The ID of the MRI sequence to update.\nmri_sequence : MRISequence\n The updated MRI sequence data.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nMRISequence\n The updated MRI sequence.", - "operationId": "update_mri_sequence_endpoint_api_v1_mri_sequences__mri_sequence_id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Mri Sequence Id", - "type": "string" - }, - "name": "mri_sequence_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MRISequence" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MRISequence" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "MRI Sequences" - ], - "summary": "Delete Mri Sequence Endpoint", - "description": "Delete an MRI sequence by its ID.\n\nParameters\n----------\nmri_sequence_id : str\n The ID of the MRI sequence to delete.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nNone", - "operationId": "delete_mri_sequence_endpoint_api_v1_mri_sequences__mri_sequence_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Mri Sequence Id", - "type": "string" - }, - "name": "mri_sequence_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/mri/sequences/mri-sequence-file/{mri_sequence_id}": { - "get": { - "tags": [ - "MRI Sequences" - ], - "summary": "Get Mri Sequence File By Id Endpoint", - "description": "Retrieve an MRI sequence file by its ID.\n\nParameters\n----------\nmri_sequence_id : str\n The ID of the MRI sequence to retrieve.\nbackground_tasks : BackgroundTasks\n The background tasks to run.\nname : str\n The name of the file to download.\ndatabase : AsyncIOMotorDatabase\n The MongoDB database handle.\n\nReturns\n-------\nFileResponse\n The retrieved MRI sequence file.", - "operationId": "get_mri_sequence_file_by_id_endpoint_api_v1_mri_sequences_mri_sequence_file__mri_sequence_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Mri Sequence Id", - "type": "string" - }, - "name": "mri_sequence_id", - "in": "path" - }, - { - "required": false, - "schema": { - "title": "Name", - "type": "string", - "default": "sequence" - }, - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/mri/sequences/mri-sequence-plot/{seq_id}": { - "get": { - "tags": [ - "MRI Sequences" - ], - "summary": "Plot Mri Sequence", - "description": "Generate plotly sequence plot data.\n\nParameters\n----------\nseq_id\n Id of the sequence to be plotted\n\nReturns\n-------\n List of plot data models for plotly", - "operationId": "plot_mri_sequence_api_v1_mri_sequences_mri_sequence_plot__seq_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Seq Id", - "type": "string" - }, - "name": "seq_id", - "in": "path" - } - ], - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Plot Mri Sequence Api V1 Mri Sequences Mri Sequence Plot Seq Id Get", - "type": "string" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/health": { - "get": { - "tags": [ - "health" - ], - "summary": "Health Check", - "description": "Perform a health check for the microservice.\n\nParameters\n----------\nis_db_connected: bool\n The status of the database connection.\n\nReturns\n-------\n The status of the microservice.", - "operationId": "health_check_health_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Health Check Health Get", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - } - } - } - }, - "/readiness": { - "get": { - "tags": [ - "health" - ], - "summary": "Readiness Check", - "description": "Perform a readiness check for the microservice.\n\nReturns\n-------\ndict\n The readiness status of the microservice.", - "operationId": "readiness_check_readiness_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Body_upload_mri_sequence_file_api_v1_mri_sequences_upload_post": { - "title": "Body_upload_mri_sequence_file_api_v1_mri_sequences_upload_post", - "required": [ - "file", - "name" - ], - "type": "object", - "properties": { - "file": { - "title": "File", - "type": "string", - "format": "binary" - }, - "name": { - "title": "Name", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - }, - "sequence_type": { - "title": "Sequence Type", - "type": "string" - }, - "tags": { - "title": "Tags", - "type": "string" - } - } - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "MRISequence": { - "title": "MRISequence", - "required": [ - "name" - ], - "type": "object", - "properties": { - "_id": { - "title": " Id", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - }, - "sequence_type": { - "title": "Sequence Type", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - }, - "updated_at": { - "title": "Updated At", - "type": "string", - "format": "date-time" - }, - "tags": { - "title": "Tags", - "type": "array", - "items": { - "type": "string" - } - }, - "file": { - "title": "File" - }, - "file_extension": { - "title": "File Extension", - "type": "string" - } - }, - "description": "A class representing an MRI sequence definition file and its associated metadata.\n\nAttributes\n----------\n id: The unique identifier for the MRI sequence, autogenerated by MongoDB.\n name: The name of the MRI sequence.\n description: A brief description of the MRI sequence.\n sequence_type: The type of MRI sequence, such as T1-weighted, T2-weighted, etc.\n created_at: The timestamp of when the MRI sequence was created.\n updated_at: The timestamp of when the MRI sequence was last updated.\n tags: A list of tags or keywords associated with the MRI sequence, useful for searching and filtering.\n file: The MRI sequence definition file content or a reference to the stored file,\n such as a GridFS identifier or an S3 URL.\n file_extension: The file extension of the MRI sequence definition file." - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/docs/source/_openapi/patient_manager_openapi.json b/docs/source/_openapi/patient_manager_openapi.json new file mode 100644 index 00000000..739f7415 --- /dev/null +++ b/docs/source/_openapi/patient_manager_openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"ScanHub-UI","version":"0.1.0"},"paths":{"/api/v1/patient/health/readiness":{"get":{"tags":["health"],"summary":"Readiness","description":"Readiness health endpoint.\n\nReturns\n-------\n Status dictionary\n\nRaises\n------\nHTTPException\n 500: Any of the exam-tree tables does not exist","operationId":"readiness_api_v1_patient_health_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/patient/":{"get":{"tags":["patients"],"summary":"Get Patient List","description":"Get all patients endpoint.\n\nReturns\n-------\n List of patient pydantic output models","operationId":"get_patient_list_api_v1_patient__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientOut"},"type":"array","title":"Response Get Patient List Api V1 Patient Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["patients"],"summary":"Create Patient","description":"Create new patient database entry.\n\nParameters\n----------\npayload\n Patient pydantic base model\n\nReturns\n-------\n Patient pydantic output model\n\nRaises\n------\nHTTPException\n 404: Could not create patient","operationId":"create_patient_api_v1_patient__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasePatient"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/patient/{patient_id}":{"get":{"tags":["patients"],"summary":"Get Patient","description":"Get a patient from database by id.\n\nParameters\n----------\npatient_id\n Id of the requested patient\n\nReturns\n-------\n Patient pydantic output model\n\nRaises\n------\nHTTPException\n 404: Patient not found","operationId":"get_patient_api_v1_patient__patient_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["patients"],"summary":"Delete Patient","description":"Delete patient from database.\n\nParameters\n----------\npatient_id\n Id of patient to be deleted\n\nRaises\n------\nHTTPException\n _description_","operationId":"delete_patient_api_v1_patient__patient_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Patient Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["patients"],"summary":"Update Patient","description":"Update existing patient endpoint.\n\nParameters\n----------\npatient_id\n Id of the patient to be updated\npayload\n Patient data to be updated\n\nReturns\n-------\n Updated patient pydantic output model\n\nRaises\n------\nHTTPException\n 404: Patient not found","operationId":"update_patient_api_v1_patient__patient_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Patient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasePatient"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BasePatient":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"birth_date":{"type":"string","format":"date","title":"Birth Date"},"sex":{"$ref":"#/components/schemas/Gender"},"height":{"type":"number","title":"Height"},"weight":{"type":"number","title":"Weight"},"issuer":{"type":"string","title":"Issuer"},"status":{"$ref":"#/components/schemas/ItemStatus","default":"NEW"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["first_name","last_name","birth_date","sex","height","weight","issuer"],"title":"BasePatient","description":"Patient pydantic base model."},"Gender":{"type":"string","enum":["MALE","FEMALE","OTHER","NOT_GIVEN"],"title":"Gender","description":"Pydantic definition of genders."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemStatus":{"type":"string","enum":["NEW","UPDATED","STARTED","FINISHED","ERROR","INPROGRESS"],"title":"ItemStatus","description":"Task status enum."},"PatientOut":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"birth_date":{"type":"string","format":"date","title":"Birth Date"},"sex":{"$ref":"#/components/schemas/Gender"},"height":{"type":"number","title":"Height"},"weight":{"type":"number","title":"Weight"},"issuer":{"type":"string","title":"Issuer"},"status":{"$ref":"#/components/schemas/ItemStatus","default":"NEW"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"id":{"type":"string","format":"uuid","title":"Id"},"datetime_created":{"type":"string","format":"date-time","title":"Datetime Created"},"datetime_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datetime Updated"}},"type":"object","required":["first_name","last_name","birth_date","sex","height","weight","issuer","id","datetime_created"],"title":"PatientOut","description":"Patient pydantic output model."},"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"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"login"}}}}}} \ No newline at end of file diff --git a/docs/source/_openapi/ui_patient_manager_openapi.json b/docs/source/_openapi/ui_patient_manager_openapi.json deleted file mode 100644 index cd701f7d..00000000 --- a/docs/source/_openapi/ui_patient_manager_openapi.json +++ /dev/null @@ -1,347 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "ScanHub-UI", - "version": "0.1.0" - }, - "paths": { - "/": { - "get": { - "tags": [ - "patients" - ], - "summary": "Get Patient List", - "description": "Get all patients endpoint.\n\nReturns\n-------\n List of patient pydantic output models", - "operationId": "get_patient_list__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Patient List Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/PatientOut" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "patients" - ], - "summary": "Create Patient", - "description": "Create new patient database entry.\n\nParameters\n----------\npayload\n Patient pydantic base model\n\nReturns\n-------\n Patient pydantic output model\n\nRaises\n------\nHTTPException\n 404: Could not create patient", - "operationId": "create_patient__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasePatient" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatientOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/{patient_id}": { - "get": { - "tags": [ - "patients" - ], - "summary": "Get Patient", - "description": "Get a patient from database by id.\n\nParameters\n----------\npatient_id\n Id of the requested patient\n\nReturns\n-------\n Patient pydantic output model\n\nRaises\n------\nHTTPException\n 404: Patient not found", - "operationId": "get_patient__patient_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Patient Id", - "type": "integer" - }, - "name": "patient_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatientOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "patients" - ], - "summary": "Update Patient", - "description": "Update existing patient endpoint.\n\nParameters\n----------\npatient_id\n Id of the patient to be updated\npayload\n Patient data to be updated\n\nReturns\n-------\n Updated patient pydantic output model\n\nRaises\n------\nHTTPException\n 404: Patient not found", - "operationId": "update_patient__patient_id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Patient Id", - "type": "integer" - }, - "name": "patient_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasePatient" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatientOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "patients" - ], - "summary": "Delete Patient", - "description": "Delete patient from database.\n\nParameters\n----------\npatient_id\n Id of patient to be deleted\n\nRaises\n------\nHTTPException\n _description_", - "operationId": "delete_patient__patient_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Patient Id", - "type": "integer" - }, - "name": "patient_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "BasePatient": { - "title": "BasePatient", - "required": [ - "sex", - "name", - "birth_date", - "issuer", - "status", - "comment" - ], - "type": "object", - "properties": { - "sex": { - "title": "Sex", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "birth_date": { - "title": "Birth Date", - "type": "string" - }, - "issuer": { - "title": "Issuer", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "comment": { - "title": "Comment", - "type": "string" - } - }, - "description": "Patient pydantic base model." - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "PatientOut": { - "title": "PatientOut", - "required": [ - "sex", - "name", - "birth_date", - "issuer", - "status", - "comment", - "id", - "datetime_created" - ], - "type": "object", - "properties": { - "sex": { - "title": "Sex", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "birth_date": { - "title": "Birth Date", - "type": "string" - }, - "issuer": { - "title": "Issuer", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "comment": { - "title": "Comment", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - } - }, - "description": "Patient pydantic output model." - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/docs/source/_openapi/user_login_manager_openapi.json b/docs/source/_openapi/user_login_manager_openapi.json new file mode 100644 index 00000000..83421902 --- /dev/null +++ b/docs/source/_openapi/user_login_manager_openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/v1/userlogin/getcurrentuser":{"get":{"tags":["user"],"summary":"Get Current User","description":"Get current user from access_token. May be called as an endpoint or used in FastAPI with Depends.\n\nParameters\n----------\naccess_token\n User token as previously obtained trough a call to /login\n Submit via HTTP header \"Authorization: Bearer \"\n\nReturns\n-------\n User pydantic model, the user data of the current user.\n\nRaises\n------\nHTTPException\n 401: Unauthorized if the token is invalid or outdated.","operationId":"get_current_user_api_v1_userlogin_getcurrentuser_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/userlogin/loginfromcookie":{"post":{"tags":["login"],"summary":"Loginfromcookie","description":"Login endpoint for login with cookie.\n\nParameters\n----------\naccess_token\n User token as previously obtained trough a call to /login\n Submit via HTTP cookie.\n\nReturns\n-------\n User pydantic model, the user data in case of a successful login.\n\nRaises\n------\nHTTPException\n 401: Unauthorized if the username or password is wrong.","operationId":"loginfromcookie_api_v1_userlogin_loginfromcookie_post","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/userlogin/login":{"post":{"tags":["login"],"summary":"Login","description":"Login endpoint.\n\nParameters\n----------\nform_data\n Http form data for OAuth2 compliant login with username and password.\n\nReturns\n-------\n User pydantic model, the user data in case of a successful login.\n\nRaises\n------\nHTTPException\n 401: Unauthorized if the username or password is wrong.","operationId":"login_api_v1_userlogin_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_v1_userlogin_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/userlogin/logout":{"post":{"tags":["login"],"summary":"Logout","description":"Logout endpoint.","operationId":"logout_api_v1_userlogin_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/userlogin/getallusers":{"get":{"tags":["user"],"summary":"Get User List","description":"Get all users endpoint (only admins).\n\nReturns\n-------\n List of all users. The access_token and token_type properties are set to \"\" for all of them.","operationId":"get_user_list_api_v1_userlogin_getallusers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/User"},"type":"array","title":"Response Get User List Api V1 Userlogin Getallusers Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/userlogin/checknousers":{"get":{"tags":["user"],"summary":"Check No Users","description":"Check if there are no users in the database.\n\nReturns\n-------\n True, if there are no users in the database.","operationId":"check_no_users_api_v1_userlogin_checknousers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Check No Users Api V1 Userlogin Checknousers Get"}}}}}}},"/api/v1/userlogin/createuser":{"post":{"tags":["user"],"summary":"Create User","description":"Create user database entry (only admins).\n\nParameters\n----------\nnew_user\n pydantic base model of new user, token_type should be \"password\" and\n access_token should contain the password of the new user.\n The password of the new user should at least be 12 characters long.","operationId":"create_user_api_v1_userlogin_createuser_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/userlogin/createfirstuser":{"post":{"tags":["user"],"summary":"Create First User","description":"Create first user.\n\nParameters\n----------\nfirst_user\n pydantic base model of the first user, token_type should be \"password\" and\n access_token should contain the password of the new user.\n The password of the new user should at least be 12 characters long.\n The role should be admin.","operationId":"create_first_user_api_v1_userlogin_createfirstuser_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/userlogin/deleteuser":{"delete":{"tags":["user"],"summary":"User Delete","description":"Delete an existing user (requires admin priviledges).\n\nParameters\n----------\nusername_to_delete\n Name of the user to delete.\n\nRaises\n------\nHTTPException\n 404: Not found","operationId":"user_delete_api_v1_userlogin_deleteuser_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username_to_delete","in":"query","required":true,"schema":{"type":"string","title":"Username To Delete"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/userlogin/updateuser":{"put":{"tags":["user"],"summary":"Update User","description":"Update the first_name, last_name, email and role of an existing user.\n\nParameters\n----------\nupdated_user\n The attribute username identifies the user to modify.\n The attributes first_name, last_name, email and role are set for this user.\n\nReturns\n-------\n None\n\nRaises\n------\nHTTPException\n 404: Not found if user not found.","operationId":"update_user_api_v1_userlogin_updateuser_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/userlogin/changepassword":{"put":{"tags":["user"],"summary":"Change Password","description":"Change password of a user. Only administrators may change passwords of other users.\n\nParameters\n----------\npassword_update_request\n .password_of_requester: the password of the requester\n .username_to_change_password_for: the username for whom to change the password\n .newpassword: the new password\n\nReturns\n-------\n None\n\nRaises\n------\nHTTPException\n 400: New Password must have at least 12 characters. Old Password must be correct.","operationId":"change_password_api_v1_userlogin_changepassword_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/userlogin/health/readiness":{"get":{"tags":["health"],"summary":"Readiness","description":"Readiness health endpoint.\n\nReturns\n-------\n Status dictionary\n\nRaises\n------\nHTTPException\n 500: User table does not exist","operationId":"readiness_api_v1_userlogin_health_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_login_api_v1_userlogin_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_api_v1_userlogin_login_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PasswordUpdateRequest":{"properties":{"password_of_requester":{"type":"string","title":"Password Of Requester"},"username_to_change_password_for":{"type":"string","title":"Username To Change Password For"},"newpassword":{"type":"string","title":"Newpassword"}},"type":"object","required":["password_of_requester","username_to_change_password_for","newpassword"],"title":"PasswordUpdateRequest"},"User":{"properties":{"username":{"type":"string","title":"Username"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"last_activity_unixtime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Activity Unixtime"},"last_login_unixtime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Login Unixtime"}},"type":"object","required":["username","first_name","last_name","role","access_token","token_type"],"title":"User"},"UserRole":{"type":"string","enum":["admin","medical","scientist","engineer"],"title":"UserRole","description":"User role enum."},"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"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"login"}}}}}} \ No newline at end of file diff --git a/docs/source/_openapi/workflow_manager_openapi.json b/docs/source/_openapi/workflow_manager_openapi.json new file mode 100644 index 00000000..e46f7cb4 --- /dev/null +++ b/docs/source/_openapi/workflow_manager_openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/v1/workflowmanager/health/readiness":{"get":{"tags":["health"],"summary":"Readiness","description":"Readiness health endpoint.\n\nInspects sqlalchemy engine and check if workflow table exists.\n\nReturns\n-------\n Status docstring\n\nRaises\n------\nHTTPException\n 500: Workflow table does not exist","operationId":"readiness_api_v1_workflowmanager_health_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/workflowmanager/trigger_task/{task_id}/":{"post":{"tags":["WorkflowManager"],"summary":"Trigger Task","description":"Endpoint to trigger a task in the orchestration engine.\n\nArgs:\n task_id (str): The ID of the DAG to be triggered.\n\nReturns\n-------\n dict: A dictionary containing the response from the orchestration engine.","operationId":"trigger_task_api_v1_workflowmanager_trigger_task__task_id___post","security":[{"OAuth2PasswordBearer":[]},{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Task Api V1 Workflowmanager Trigger Task Task Id Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflowmanager/result_ready/{task_id}/{result_id}":{"post":{"tags":["WorkflowManager"],"summary":"Callback Results Ready","description":"Notify that results are ready via callback endpoint.\n\nArgs:\n dag_id (str): The ID of the DAG.\n access_token (str): The access token for authentication.\n\nReturns\n-------\n dict: A dictionary containing a success message.","operationId":"callback_results_ready_api_v1_workflowmanager_result_ready__task_id___result_id__post","security":[{"OAuth2PasswordBearer":[]},{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Id"}},{"name":"result_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Callback Results Ready Api V1 Workflowmanager Result Ready Task Id Result Id Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflowmanager/tasks/":{"get":{"tags":["WorkflowManager"],"summary":"List Available Tasks","description":"Endpoint to list the available tasks from the orchestration engine.\n\nReturns\n-------\n dict: A dictionary containing the list of available dagster jobs.","operationId":"list_available_tasks_api_v1_workflowmanager_tasks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"login"}}}}}} \ No newline at end of file diff --git a/docs/source/_openapi/workflow_openapi.json b/docs/source/_openapi/workflow_openapi.json deleted file mode 100644 index 7084e766..00000000 --- a/docs/source/_openapi/workflow_openapi.json +++ /dev/null @@ -1,445 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "paths": { - "/api/v1/workflow/": { - "get": { - "tags": [ - "workflow" - ], - "summary": "Get Workflow List", - "description": "Get all workflows endpoint.\n\nReturns\n-------\n List of workflow pydantic output models, might be empty", - "operationId": "get_workflow_list_api_v1_workflow__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Workflow List Api V1 Workflow Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkflowOut" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "workflow" - ], - "summary": "Create Workflow", - "description": "Create new workflow endpoint.\n\nParameters\n----------\npayload\n Workflow pydantic base model\n\nReturns\n-------\n Workflow pydantic output model\n\nRaises\n------\nHTTPException\n 404: Creation unsuccessful", - "operationId": "create_workflow_api_v1_workflow__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseWorkflow" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/workflow/{workflow_id}": { - "get": { - "tags": [ - "workflow" - ], - "summary": "Get Workflow", - "description": "Get workflow endpoint.\n\nParameters\n----------\nworkflow_id\n Id of the workflow object to be returned\n\nReturns\n-------\n Workflow pydantic output model\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "get_workflow_api_v1_workflow__workflow_id__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Workflow Id", - "type": "integer" - }, - "name": "workflow_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "workflow" - ], - "summary": "Delete Workflow", - "description": "Delete workflow endpoint.\n\nParameters\n----------\nworkflow_id\n Id of workflow to be deleted\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "delete_workflow_api_v1_workflow__workflow_id__delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Workflow Id", - "type": "integer" - }, - "name": "workflow_id", - "in": "path" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/workflow/{workflow_id}/": { - "put": { - "tags": [ - "workflow" - ], - "summary": "Update Workflow", - "description": "Update existing workflow endpoint.\n\nParameters\n----------\nworkflow_id\n Id of the workflow to be updated\npayload\n Data to be updated, workflow pydantic base model\n\nReturns\n-------\n Workflow pydantic output model.\n\nRaises\n------\nHTTPException\n 404: Not found", - "operationId": "update_workflow_api_v1_workflow__workflow_id___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Workflow Id", - "type": "integer" - }, - "name": "workflow_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseWorkflow" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowOut" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/workflow/upload/{record_id}/": { - "post": { - "summary": "Upload Result", - "description": "Upload workflow result.\n\nParameters\n----------\nrecord_id\n Id of the record, which is processed by workflow\nfile, optional\n Data upload, e.g. reconstruction result, by default File(...)\n\nReturns\n-------\n Notification", - "operationId": "upload_result_api_v1_workflow_upload__record_id___post", - "parameters": [ - { - "required": true, - "schema": { - "title": "Record Id", - "type": "string" - }, - "name": "record_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_upload_result_api_v1_workflow_upload__record_id___post" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Upload Result Api V1 Workflow Upload Record Id Post", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/api/v1/workflow/health/readiness": { - "get": { - "tags": [ - "health" - ], - "summary": "Readiness", - "description": "Readiness health endpoint.\n\nInspects sqlalchemy engine and check if workflow table exists.\n\nReturns\n-------\n Status docstring\n\nRaises\n------\nHTTPException\n 500: Workflow table does not exist", - "operationId": "readiness_api_v1_workflow_health_readiness_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - } - }, - "components": { - "schemas": { - "BaseWorkflow": { - "title": "BaseWorkflow", - "required": [ - "host", - "name", - "modality", - "type", - "status", - "kafka_topic" - ], - "type": "object", - "properties": { - "host": { - "title": "Host", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "author": { - "title": "Author", - "type": "string" - }, - "modality": { - "title": "Modality", - "type": "string" - }, - "type": { - "title": "Type", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "kafka_topic": { - "title": "Kafka Topic", - "type": "string" - } - }, - "description": "Workflow pydantic base model." - }, - "Body_upload_result_api_v1_workflow_upload__record_id___post": { - "title": "Body_upload_result_api_v1_workflow_upload__record_id___post", - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "title": "File", - "type": "string", - "format": "binary" - } - } - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - }, - "WorkflowOut": { - "title": "WorkflowOut", - "required": [ - "host", - "name", - "modality", - "type", - "status", - "kafka_topic", - "id", - "datetime_created" - ], - "type": "object", - "properties": { - "host": { - "title": "Host", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "author": { - "title": "Author", - "type": "string" - }, - "modality": { - "title": "Modality", - "type": "string" - }, - "type": { - "title": "Type", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "kafka_topic": { - "title": "Kafka Topic", - "type": "string" - }, - "id": { - "title": "Id", - "type": "integer" - }, - "datetime_created": { - "title": "Datetime Created", - "type": "string", - "format": "date-time" - }, - "datetime_updated": { - "title": "Datetime Updated", - "type": "string", - "format": "date-time" - } - }, - "description": "Workflow pydantic output model." - } - } - } -} \ No newline at end of file diff --git a/docs/source/api_device.rst b/docs/source/api_device_manager.rst similarity index 97% rename from docs/source/api_device.rst rename to docs/source/api_device_manager.rst index 33216094..49638053 100644 --- a/docs/source/api_device.rst +++ b/docs/source/api_device_manager.rst @@ -13,7 +13,7 @@ This API allows you to perform essential operations such as reading the device h Web API ------- -.. openapi:: ./_openapi/device_openapi.json +.. openapi:: ./_openapi/device_manager_openapi.json License ------- diff --git a/docs/source/api_exam.rst b/docs/source/api_exam_manager.rst similarity index 98% rename from docs/source/api_exam.rst rename to docs/source/api_exam_manager.rst index 628a6a2b..025edda0 100644 --- a/docs/source/api_exam.rst +++ b/docs/source/api_exam_manager.rst @@ -13,7 +13,7 @@ This comprehensive API allows users to perform essential operations on these ent Web API ------- -.. openapi:: ./_openapi/exam_openapi.json +.. openapi:: ./_openapi/exam_manager_openapi.json License ------- diff --git a/docs/source/api_mri_acquisition.rst b/docs/source/api_mri_acquisition.rst deleted file mode 100644 index 14a17d22..00000000 --- a/docs/source/api_mri_acquisition.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. - SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial - -MRI Acquisition Manager -======================= - -Introduction ------------- - -The Acquisition Manager API provides a streamlined interface for managing the MRI acquisition process, bridging the gap between the scanning devices and the user-facing components. -Its straightforward design ensures that the initiation and monitoring of scans are conducted efficiently and transparently, enhancing the overall workflow of medical imaging procedures. - -Web API -------- - -.. openapi:: ./_openapi/mri/acquisition_openapi.json - -License -------- - -MRI Acquisition Manager, including all its source code and associated documentation (collectively, the "Software"), is dual-licensed under the GNU General Public License version 3 (GPLv3) and the ScanHub commercial license. - -Open Source License -~~~~~~~~~~~~~~~~~~~ - -If you want to use the Software under the terms of the GPLv3, you may do so for free. Under the GPLv3, you are allowed to modify and distribute the Software, but any derivative works that you distribute must also be licensed under the GPLv3. For the precise terms and conditions, please refer to the text of the GPLv3, which is included with the Software and can also be found at: http://www.gnu.org/licenses/gpl-3.0.html - -Commercial License -~~~~~~~~~~~~~~~~~~~ - -If you wish to use the Software without the restrictions of the GPLv3, such as for the purpose of developing proprietary software that includes the Software without the obligation to disclose your source code, you may purchase a commercial license from BRAIN-LINK UG (haftungsbeschränkt). - -The commercial license grants you, the licensee, the rights to use, modify, and distribute the Software without the requirement of providing the source code of your proprietary software to the end users. The commercial license also includes access to premium support and services. - -For more information on the commercial license, including pricing, please contact us at info@brain-link.de. - -Choice of License -~~~~~~~~~~~~~~~~~~~ - -You may choose to use the Software under either the GPLv3 or the commercial license. If you choose to use the Software under the GPLv3, you must comply with all of the terms of the GPLv3. If you choose to use the Software under the commercial license, you must comply with all of the terms of the commercial license. - -Disclaimer -~~~~~~~~~~ - -This is not a legal document. The exact terms of the GPLv3 and the commercial license are specified in their respective legal texts. This document is merely intended to provide a general overview of the dual licensing scheme. diff --git a/docs/source/api_mri_sequences.rst b/docs/source/api_mri_sequences.rst deleted file mode 100644 index 53a9bdfd..00000000 --- a/docs/source/api_mri_sequences.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. - SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial - -MRI Sequences Manager -===================== - -Introduction ------------- - -The MRI Sequence Manager API is designed to handle the creation, retrieval, modification, and deletion of MRI sequences within a medical imaging environment. -Leveraging MongoDB for storage, this API provides a comprehensive set of endpoints to manage various aspects of MRI sequences. Below is an overview of the key endpoints: - -Web API -------- - -.. openapi:: ./_openapi/mri/sequences_openapi.json - -License -------- - -MRI Sequence Manager, including all its source code and associated documentation (collectively, the "Software"), is dual-licensed under the GNU General Public License version 3 (GPLv3) and the ScanHub commercial license. - -Open Source License -~~~~~~~~~~~~~~~~~~~ - -If you want to use the Software under the terms of the GPLv3, you may do so for free. Under the GPLv3, you are allowed to modify and distribute the Software, but any derivative works that you distribute must also be licensed under the GPLv3. For the precise terms and conditions, please refer to the text of the GPLv3, which is included with the Software and can also be found at: http://www.gnu.org/licenses/gpl-3.0.html - -Commercial License -~~~~~~~~~~~~~~~~~~~ - -If you wish to use the Software without the restrictions of the GPLv3, such as for the purpose of developing proprietary software that includes the Software without the obligation to disclose your source code, you may purchase a commercial license from BRAIN-LINK UG (haftungsbeschränkt). - -The commercial license grants you, the licensee, the rights to use, modify, and distribute the Software without the requirement of providing the source code of your proprietary software to the end users. The commercial license also includes access to premium support and services. - -For more information on the commercial license, including pricing, please contact us at info@brain-link.de. - -Choice of License -~~~~~~~~~~~~~~~~~~~ - -You may choose to use the Software under either the GPLv3 or the commercial license. If you choose to use the Software under the GPLv3, you must comply with all of the terms of the GPLv3. If you choose to use the Software under the commercial license, you must comply with all of the terms of the commercial license. - -Disclaimer -~~~~~~~~~~ - -This is not a legal document. The exact terms of the GPLv3 and the commercial license are specified in their respective legal texts. This document is merely intended to provide a general overview of the dual licensing scheme. diff --git a/docs/source/api_ui_patient_manager.rst b/docs/source/api_patient_manager.rst similarity index 97% rename from docs/source/api_ui_patient_manager.rst rename to docs/source/api_patient_manager.rst index 32c92b72..30c3aab1 100644 --- a/docs/source/api_ui_patient_manager.rst +++ b/docs/source/api_patient_manager.rst @@ -14,7 +14,7 @@ Here's a brief look at the main endpoints: Web API ------- -.. openapi:: ./_openapi/ui_patient_manager_openapi.json +.. openapi:: ./_openapi/patient_manager_openapi.json License ------- diff --git a/docs/source/api_workflow.rst b/docs/source/api_user_login_manager.rst similarity index 97% rename from docs/source/api_workflow.rst rename to docs/source/api_user_login_manager.rst index cfb22b7b..e3284592 100644 --- a/docs/source/api_workflow.rst +++ b/docs/source/api_user_login_manager.rst @@ -13,7 +13,7 @@ It plays a crucial role in creating, updating, retrieving, and deleting workflow Web API ------- -.. openapi:: ./_openapi/workflow_openapi.json +.. openapi:: ./_openapi/workflow_manager_openapi.json License ------- diff --git a/docs/source/api_workflow_manager.rst b/docs/source/api_workflow_manager.rst new file mode 100644 index 00000000..e3284592 --- /dev/null +++ b/docs/source/api_workflow_manager.rst @@ -0,0 +1,45 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +Workflow Manager +================ + +Introduction +------------ + +The Workflow Manager API provided by ScanHub is specifically designed to manage the workflows within a scanning and imaging environment. +It plays a crucial role in creating, updating, retrieving, and deleting workflows, as well as handling the uploading of results related to specific records. The key endpoints in this API are: + +Web API +------- + +.. openapi:: ./_openapi/workflow_manager_openapi.json + +License +------- + +Workflow Manager, including all its source code and associated documentation (collectively, the "Software"), is dual-licensed under the GNU General Public License version 3 (GPLv3) and the ScanHub commercial license. + +Open Source License +~~~~~~~~~~~~~~~~~~~ + +If you want to use the Software under the terms of the GPLv3, you may do so for free. Under the GPLv3, you are allowed to modify and distribute the Software, but any derivative works that you distribute must also be licensed under the GPLv3. For the precise terms and conditions, please refer to the text of the GPLv3, which is included with the Software and can also be found at: http://www.gnu.org/licenses/gpl-3.0.html + +Commercial License +~~~~~~~~~~~~~~~~~~~ + +If you wish to use the Software without the restrictions of the GPLv3, such as for the purpose of developing proprietary software that includes the Software without the obligation to disclose your source code, you may purchase a commercial license from BRAIN-LINK UG (haftungsbeschränkt). + +The commercial license grants you, the licensee, the rights to use, modify, and distribute the Software without the requirement of providing the source code of your proprietary software to the end users. The commercial license also includes access to premium support and services. + +For more information on the commercial license, including pricing, please contact us at info@brain-link.de. + +Choice of License +~~~~~~~~~~~~~~~~~~~ + +You may choose to use the Software under either the GPLv3 or the commercial license. If you choose to use the Software under the GPLv3, you must comply with all of the terms of the GPLv3. If you choose to use the Software under the commercial license, you must comply with all of the terms of the commercial license. + +Disclaimer +~~~~~~~~~~ + +This is not a legal document. The exact terms of the GPLv3 and the commercial license are specified in their respective legal texts. This document is merely intended to provide a general overview of the dual licensing scheme. diff --git a/docs/source/scanhub_api.rst b/docs/source/scanhub_api.rst index cfd6715e..386e34ad 100644 --- a/docs/source/scanhub_api.rst +++ b/docs/source/scanhub_api.rst @@ -6,10 +6,8 @@ Web API documentation for services. .. toctree:: :maxdepth: 1 - api_ui_patient_manager - - api_device - api_exam - api_workflow - api_mri_acquisition - api_mri_sequences \ No newline at end of file + api_device_manager + api_exam_manager + api_patient_manager + api_user_login_manager + api_workflow_manager \ No newline at end of file From af42657f422cded08a9ffe6cda0f6ca9cb6e0730 Mon Sep 17 00:00:00 2001 From: Christoph Dinh Date: Sun, 31 Aug 2025 16:54:02 +0200 Subject: [PATCH 2/6] fix user login description --- docs/source/api_user_login_manager.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/api_user_login_manager.rst b/docs/source/api_user_login_manager.rst index e3284592..3213a2be 100644 --- a/docs/source/api_user_login_manager.rst +++ b/docs/source/api_user_login_manager.rst @@ -1,14 +1,14 @@ .. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial -Workflow Manager +User Login Manager ================ Introduction ------------ -The Workflow Manager API provided by ScanHub is specifically designed to manage the workflows within a scanning and imaging environment. -It plays a crucial role in creating, updating, retrieving, and deleting workflows, as well as handling the uploading of results related to specific records. The key endpoints in this API are: +The User Login Manager API provided by ScanHub is specifically designed to manage user authentication and authorization within the system. +It plays a crucial role in creating, updating, retrieving, and deleting user login sessions, as well as handling the uploading of results related to specific records. The key endpoints in this API are: Web API ------- @@ -18,7 +18,7 @@ Web API License ------- -Workflow Manager, including all its source code and associated documentation (collectively, the "Software"), is dual-licensed under the GNU General Public License version 3 (GPLv3) and the ScanHub commercial license. +User Login Manager, including all its source code and associated documentation (collectively, the "Software"), is dual-licensed under the GNU General Public License version 3 (GPLv3) and the ScanHub commercial license. Open Source License ~~~~~~~~~~~~~~~~~~~ From 9e5111ff7af796089f7565e1b8e605dda557e0df Mon Sep 17 00:00:00 2001 From: Christoph Dinh Date: Sun, 31 Aug 2025 17:06:44 +0200 Subject: [PATCH 3/6] fix reference --- docs/source/api_user_login_manager.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/api_user_login_manager.rst b/docs/source/api_user_login_manager.rst index 3213a2be..da0f48e5 100644 --- a/docs/source/api_user_login_manager.rst +++ b/docs/source/api_user_login_manager.rst @@ -13,7 +13,7 @@ It plays a crucial role in creating, updating, retrieving, and deleting user log Web API ------- -.. openapi:: ./_openapi/workflow_manager_openapi.json +.. openapi:: ./_openapi/api_user_login_manager_openapi.json License ------- From 0a94ed3db41fb6dcb9dece38066674c5f9548829 Mon Sep 17 00:00:00 2001 From: Christoph Dinh Date: Sun, 31 Aug 2025 17:18:25 +0200 Subject: [PATCH 4/6] fix url --- docs/source/api_user_login_manager.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/api_user_login_manager.rst b/docs/source/api_user_login_manager.rst index da0f48e5..caa90616 100644 --- a/docs/source/api_user_login_manager.rst +++ b/docs/source/api_user_login_manager.rst @@ -13,7 +13,7 @@ It plays a crucial role in creating, updating, retrieving, and deleting user log Web API ------- -.. openapi:: ./_openapi/api_user_login_manager_openapi.json +.. openapi:: ./_openapi/user_login_manager_openapi.json License ------- From c85572e6dcb7ff26fa4ec0367b8a1be9fdc2ce51 Mon Sep 17 00:00:00 2001 From: Christoph Dinh Date: Sun, 19 Oct 2025 21:18:29 +0200 Subject: [PATCH 5/6] Added new getting started section --- docs/source/_getting_started/deployment.rst | 62 +++++++++++++++++ docs/source/_getting_started/installation.rst | 66 +++++++++++++++++++ docs/source/_getting_started/quickstart.rst | 58 ++++++++++++++++ .../_getting_started/troubleshooting.rst | 34 ++++++++++ .../source/_getting_started/using_scanhub.rst | 44 +++++++++++++ .../_getting_started/what_is_scanhub.rst | 32 +++++++++ docs/source/index.rst | 22 +++++-- 7 files changed, 314 insertions(+), 4 deletions(-) create mode 100644 docs/source/_getting_started/deployment.rst create mode 100644 docs/source/_getting_started/installation.rst create mode 100644 docs/source/_getting_started/quickstart.rst create mode 100644 docs/source/_getting_started/troubleshooting.rst create mode 100644 docs/source/_getting_started/using_scanhub.rst create mode 100644 docs/source/_getting_started/what_is_scanhub.rst diff --git a/docs/source/_getting_started/deployment.rst b/docs/source/_getting_started/deployment.rst new file mode 100644 index 00000000..fe7119e9 --- /dev/null +++ b/docs/source/_getting_started/deployment.rst @@ -0,0 +1,62 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +========================= +Deployment (production) +========================= + +**Status:** initial notes. Validate for your environment before clinical/research use. + +Prerequisites +============= + +- A Linux server (on-prem or cloud) with Docker & Docker Compose. +- A **domain** (e.g., ``scanhub.example.org``). +- A **valid TLS certificate** and **private key** for that domain. + +Steps (high-level) +================== + +1) Provision server and DNS +--------------------------- + +- Point your domain (A/AAAA) to the server. +- Ensure outbound internet access for pulling images. + +2) Configure TLS and secrets +---------------------------- + +Replace the development defaults with your own: + +- Put your **private key** and **certificate** in the appropriate secrets paths. +- **Do not** commit these to version control. + +3) Update hostnames and CORS +---------------------------- + +Replace ``localhost`` with your real domain in: + +- **NGINX config** (e.g., ``infrastructure/nginx_config.conf``: `server_name` and HTTP→HTTPS redirect) +- **UI URLs** (e.g., in the UI URL utility) +- **Allowed origins** in API services (e.g., device/exam/patient/sequence managers) + +4) Start services +----------------- + +- Build/pull images and bring up the stack:: + + docker compose build + docker compose up -d + +5) Create users +--------------- + +- Use the UI to create admin and operator accounts with strong passwords. + +Security notes +============== + +- Limit exposure of admin endpoints. +- Consider a reverse proxy or WAF, backups, central logging, and secrets management. +- Review data protection requirements applicable to your use case. + diff --git a/docs/source/_getting_started/installation.rst b/docs/source/_getting_started/installation.rst new file mode 100644 index 00000000..fbbb1c71 --- /dev/null +++ b/docs/source/_getting_started/installation.rst @@ -0,0 +1,66 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +============================== +Installation (detailed, local) +============================== + +This page expands the Quickstart with additional notes useful for development and CI. + +Build strategy +============== + +Base image +---------- + +ScanHub services share a **base image**. You can: + +- **Build locally** (best when you modify base libs):: + + cd services/base + docker build -t scanhub-base . + cd ../.. + docker compose build --build-arg BASE_IMG=scanhub-base:latest + +- **Use the GHCR base image** (fastest to begin):: + + docker compose build + +Rebuild when needed +------------------- + +Rebuild containers whenever you change the base image, install new libraries, or alter structural aspects of a service.:: + + docker compose build + +Start/stop lifecycle +==================== + +- Start (detached):: + + docker compose up --detach + +- Stop and remove containers:: + + docker compose down + +Local HTTPS (development) +========================= + +By default, ScanHub runs with a **self-signed certificate**. Browsers will warn; for **localhost** in development you can proceed. For production, see :doc:`deployment`. + +Default credentials +=================== + +If no user exists, the UI presents a **Create first user** form. Enforce a strong password (≥12 chars). + +Where to change URLs and CORS +============================= + +For production hosts you will later change **localhost** to your domain in: + +- NGINX config (see deployment page) +- UI URL configuration +- Allowed origins in API services + +(Exact file paths are summarized in :doc:`deployment`.) diff --git a/docs/source/_getting_started/quickstart.rst b/docs/source/_getting_started/quickstart.rst new file mode 100644 index 00000000..55c40bb2 --- /dev/null +++ b/docs/source/_getting_started/quickstart.rst @@ -0,0 +1,58 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +========================= +Quickstart (5–10 minutes) +========================= + +This quickstart gets you running **locally** using Docker Compose. + +Prerequisites +============= + +- Docker and Docker Compose installed on your machine. +- Internet connection to build/pull images. + +Steps +===== + +1. **Clone the repository**:: + + git clone https://github.com/brain-link/scanhub.git + cd scanhub + +2. **Build images** + + **Option A (recommended for development)** – build with local base image:: + + cd services/base + docker build -t scanhub-base . + cd ../.. + docker compose build --build-arg BASE_IMG=scanhub-base:latest + + **Option B (convenience)** – use base image from GHCR:: + + docker compose build + +3. **Start ScanHub**:: + + docker compose up --detach + +4. **Open the UI** + + Navigate to **https://localhost/**. + Your browser will warn about the self-signed certificate (development default) – continue anyway. + +5. **Create the first user** + + If the database is empty, ScanHub prompts you to create an admin-level user. Use a **strong password (≥12 chars)**. + +6. **Stop ScanHub**:: + + docker compose down + +Next steps +========== + +- See :doc:`using_scanhub` to plan an exam, run a simulation, and view results. +- See :doc:`troubleshooting` if you hit Docker or HTTPS issues. diff --git a/docs/source/_getting_started/troubleshooting.rst b/docs/source/_getting_started/troubleshooting.rst new file mode 100644 index 00000000..e793e832 --- /dev/null +++ b/docs/source/_getting_started/troubleshooting.rst @@ -0,0 +1,34 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +======================== +Troubleshooting & FAQs +======================== + +Browser warns about HTTPS +========================= + +**Symptom:** Browser shows a certificate warning on https://localhost/. + +**Cause:** Development uses a self-signed certificate. + +**Fix:** Proceed in development, or configure a real certificate for production (see :doc:`deployment`). + +I changed code but nothing updates +================================== + +**Symptom:** UI or services still behave like before a change. + +**Cause:** Containers need a rebuild after structural/library changes. + +**Fix:** Rebuild and restart:: + + docker compose build + docker compose up -d + +Docker Compose command not found +================================ + +**Symptom:** Script uses ``docker compose`` but your system has ``docker-compose`` (hyphenated). + +**Fix:** Use the command available on your system, or install the latest Docker Compose. diff --git a/docs/source/_getting_started/using_scanhub.rst b/docs/source/_getting_started/using_scanhub.rst new file mode 100644 index 00000000..b39a7bbf --- /dev/null +++ b/docs/source/_getting_started/using_scanhub.rst @@ -0,0 +1,44 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +========================= +Using ScanHub (the UI) +========================= + +This hands-on tour shows the typical first workflow. + +1) Sign in / Create admin user +============================== + +- On first run, create the initial user in the UI. +- Subsequent logins use your credentials. + +2) Register or select a device +============================== + +- Open **Device Manager**. +- For a quick trial, select a **simulation device** if available (e.g., a KomaMRI-backed device). + +3) Inspect sequences +==================== + +- Open **MRI Sequences Manager**. +- Browse and inspect available sequences; confirm parameters match your intended test. + +4) Plan and run an exam +======================= + +- Open **Exam Manager** and create a new exam for a demo patient. +- Select the device and sequence, then **start acquisition** (or run a simulation on the virtual scanner). + +5) View results (DICOM) +======================= + +- When processing completes, open the exam results to **view the reconstructed DICOM** objects in the UI. +- Confirm metadata and basic image quality; iterate if necessary. + +Tips +==== + +- Use simulated devices to validate pipelines before connecting real scanners. +- Keep an eye on logs (`docker compose logs -f`) if a job stalls. diff --git a/docs/source/_getting_started/what_is_scanhub.rst b/docs/source/_getting_started/what_is_scanhub.rst new file mode 100644 index 00000000..32341c3d --- /dev/null +++ b/docs/source/_getting_started/what_is_scanhub.rst @@ -0,0 +1,32 @@ +.. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. + SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial + +==================== +What is ScanHub? +==================== + +**ScanHub** is an open-source, cloud-oriented **multimodal acquisition platform** for medical imaging workflows, with a current focus on **MRI**. It integrates device management, exam planning, sequence management, workflow execution and cloud-based reconstruction/processing into one coherent platform and UI. + +Why it exists +============= + +Traditional MRI console workflows are costly to scale, hard to extend, and often siloed. ScanHub shifts reconstruction and processing tasks into a cloud-ready, modular architecture, enabling: + +- **Scalability & flexibility** – run heavier workloads in the cloud, plug in your own microservices. +- **Open innovation** – avoid vendor lock-in; build on transparent, community-driven components. +- **Collaboration & sharing** – central data handling and standard formats encourage teamwork. +- **Interoperability** – sequence, device and workflow managers target open standards and cross-manufacturer use. + +Key building blocks +=================== + +- **Device Manager** – register/select devices (incl. simulated devices). +- **Exam Manager** – plan acquisitions and review completed results. +- **MRI Sequences Manager** – manage and inspect sequences. +- **Workflow Engine** – orchestrates reconstruction/processing jobs. +- **Web UI (scanhub-ui)** – single entry point for operators and researchers. + +Licensing +========= + +ScanHub is **dual-licensed**: GPLv3 **or** a commercial license from BRAIN-LINK UG. Choose GPLv3 for open-source use; choose commercial to embed without copyleft obligations and to obtain premium services. (See the “ScanHub” page for details.) diff --git a/docs/source/index.rst b/docs/source/index.rst index 8ae71ae4..17e35d77 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -4,12 +4,15 @@ ScanHub Documentation ##################### -Welcome to the online documentation of ScanHub, an open-source multimodal acquisition platform dedicated to workflows of medical imaging. Focusing prominently on MRI technology, ScanHub addresses the nuanced challenges of image acquisition, processing, and sharing by seamlessly integrating cloud-based solutions. +Welcome to the online documentation of **ScanHub**, an open-source multimodal acquisition platform dedicated to workflows of medical imaging. +Focusing prominently on **MRI technology**, ScanHub addresses the nuanced challenges of image acquisition, processing, and sharing by seamlessly integrating cloud-based solutions. -Developed in response to the challenges in traditional MRI infrastructure, such as scalability, cost-efficiency, and collaborative limitations, ScanHub emerges as a solution, ensuring the management and utilization of MRI data. By relocating image reconstruction and storage to the cloud, it not only aims to reduce associated costs but also enhances scalability and collaboration across various spectrums of MRI research and clinical applications. +Developed in response to the limitations of traditional MRI infrastructure — such as scalability, cost-efficiency, and collaborative restrictions — +ScanHub enables efficient management and utilization of MRI data. By relocating image reconstruction and storage to the cloud, it reduces operational cost, +enhances scalability, and fosters collaboration across MRI research and clinical domains. -Getting started ---------------- +Documentation Overview +---------------------- .. toctree:: :maxdepth: 1 @@ -17,6 +20,17 @@ Getting started introduction +.. toctree:: + :maxdepth: 1 + :caption: Getting Started + + _getting_started/what_is_scanhub + _getting_started/quickstart + _getting_started/installation + _getting_started/using_scanhub + _getting_started/deployment + _getting_started/troubleshooting + .. toctree:: :maxdepth: 1 :caption: Web API Reference From f0423bf4b4ca64b97ce01132c3f2d982879cbef3 Mon Sep 17 00:00:00 2001 From: Christoph Dinh Date: Sun, 19 Oct 2025 21:28:25 +0200 Subject: [PATCH 6/6] correct documentation --- docs/source/_getting_started/deployment.rst | 57 +++++++-------- .../source/_getting_started/using_scanhub.rst | 70 +++++++++++-------- .../_getting_started/what_is_scanhub.rst | 36 +++++++--- docs/source/index.rst | 4 +- 4 files changed, 94 insertions(+), 73 deletions(-) diff --git a/docs/source/_getting_started/deployment.rst b/docs/source/_getting_started/deployment.rst index fe7119e9..91e3d652 100644 --- a/docs/source/_getting_started/deployment.rst +++ b/docs/source/_getting_started/deployment.rst @@ -10,53 +10,46 @@ Deployment (production) Prerequisites ============= -- A Linux server (on-prem or cloud) with Docker & Docker Compose. -- A **domain** (e.g., ``scanhub.example.org``). -- A **valid TLS certificate** and **private key** for that domain. +- Linux server with Docker & Docker Compose +- Domain (e.g., ``scanhub.example.org``) +- Valid TLS certificate + private key Steps (high-level) ================== 1) Provision server and DNS --------------------------- - -- Point your domain (A/AAAA) to the server. -- Ensure outbound internet access for pulling images. +- Point A/AAAA records to your server. 2) Configure TLS and secrets ---------------------------- - -Replace the development defaults with your own: - -- Put your **private key** and **certificate** in the appropriate secrets paths. -- **Do not** commit these to version control. +- Place your **private key** and **certificate** under ``secrets/`` (do **not** commit). 3) Update hostnames and CORS ---------------------------- - -Replace ``localhost`` with your real domain in: - -- **NGINX config** (e.g., ``infrastructure/nginx_config.conf``: `server_name` and HTTP→HTTPS redirect) -- **UI URLs** (e.g., in the UI URL utility) -- **Allowed origins** in API services (e.g., device/exam/patient/sequence managers) - -4) Start services ------------------ - -- Build/pull images and bring up the stack:: - - docker compose build - docker compose up -d +Replace ``localhost`` with your domain in: + +- **NGINX**: ``infrastructure/nginx_config.conf`` (``server_name``, HTTP→HTTPS redirect) +- **UI base URLs**: ``scanhub-ui/src/utils/Urls.tsx`` +- **Allowed origins** in API services: + - ``services/device-manager/app/main.py`` + - ``services/exam-manager/app/main.py`` + - ``services/mri/sequence-manager/app/main.py`` + - ``services/patient-manager/app/main.py`` + - ``services/user-login-manager/app/main.py`` + - ``services/workflow-manager/app/main.py`` + +4) Build & start +---------------- +:: + docker compose build + docker compose up -d 5) Create users --------------- - -- Use the UI to create admin and operator accounts with strong passwords. +Use the UI to create admin/operator accounts with strong passwords. Security notes ============== - -- Limit exposure of admin endpoints. -- Consider a reverse proxy or WAF, backups, central logging, and secrets management. -- Review data protection requirements applicable to your use case. - +- Limit admin endpoints; consider a reverse proxy/WAF, backups, logging, and secrets management. +- Review data protection requirements for your use case. diff --git a/docs/source/_getting_started/using_scanhub.rst b/docs/source/_getting_started/using_scanhub.rst index b39a7bbf..2f20ef8b 100644 --- a/docs/source/_getting_started/using_scanhub.rst +++ b/docs/source/_getting_started/using_scanhub.rst @@ -1,44 +1,58 @@ .. Copyright (C) 2023, BRAIN-LINK UG (haftungsbeschränkt). All Rights Reserved. SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-ScanHub-Commercial -========================= -Using ScanHub (the UI) -========================= +============================= +Using the ScanHub Web UI +============================= -This hands-on tour shows the typical first workflow. +All user interaction with **ScanHub** happens through its **Web UI**, a browser-based interface that provides access to the complete imaging workflow — from planning to viewing results. -1) Sign in / Create admin user -============================== +Accessing the Web UI +==================== +After starting the system with ``docker compose up -d``, open your browser at: -- On first run, create the initial user in the UI. -- Subsequent logins use your credentials. + **https://localhost/** -2) Register or select a device -============================== +For production deployments, replace *localhost* with your configured domain. -- Open **Device Manager**. -- For a quick trial, select a **simulation device** if available (e.g., a KomaMRI-backed device). +First login +=========== +When the system runs for the first time, the Web UI will prompt you to create an administrator account. +Use a strong password (at least 12 characters). You can later add standard user accounts under *Settings → User Management*. -3) Inspect sequences -==================== +Typical workflow +================ + +1. **Login** + Sign in using your administrator or user credentials. + +2. **Plan an exam** + Define a new exam by specifying the subject, study details, and imaging sequence. + (In the development setup, simulated devices and test sequences are preconfigured.) + +3. **Run the acquisition or simulation** + Start the exam. Data will be acquired or simulated and processed automatically in the background. + No additional configuration or manual processing steps are required. -- Open **MRI Sequences Manager**. -- Browse and inspect available sequences; confirm parameters match your intended test. +4. **Inspect results** + Once processing completes, you can view and download reconstructed DICOM images directly from the Web UI. -4) Plan and run an exam -======================= +5. **Manage data** + Review previous exams, manage subjects, and organize studies from the dashboard. -- Open **Exam Manager** and create a new exam for a demo patient. -- Select the device and sequence, then **start acquisition** (or run a simulation on the virtual scanner). +Monitoring +========== +To observe background activity or troubleshoot technical issues, you can follow the logs of all running services:: -5) View results (DICOM) -======================= + docker compose logs -f -- When processing completes, open the exam results to **view the reconstructed DICOM** objects in the UI. -- Confirm metadata and basic image quality; iterate if necessary. +Shutdown +======== +To stop all containers and services safely:: -Tips -==== + docker compose down -- Use simulated devices to validate pipelines before connecting real scanners. -- Keep an eye on logs (`docker compose logs -f`) if a job stalls. +Notes +===== +- The Web UI encapsulates all backend functionality — users never interact with the individual services directly. +- For development and debugging, internal microservices reside under the ``services/`` directory, but they remain transparent to end users. diff --git a/docs/source/_getting_started/what_is_scanhub.rst b/docs/source/_getting_started/what_is_scanhub.rst index 32341c3d..29a22bab 100644 --- a/docs/source/_getting_started/what_is_scanhub.rst +++ b/docs/source/_getting_started/what_is_scanhub.rst @@ -5,28 +5,42 @@ What is ScanHub? ==================== -**ScanHub** is an open-source, cloud-oriented **multimodal acquisition platform** for medical imaging workflows, with a current focus on **MRI**. It integrates device management, exam planning, sequence management, workflow execution and cloud-based reconstruction/processing into one coherent platform and UI. +**ScanHub** is an open-source, cloud-oriented **multimodal acquisition platform** for medical imaging workflows (currently focused on **MRI**). It integrates device management, exam planning, sequence management, workflow execution, and cloud-based reconstruction/processing into one coherent platform and UI. + +Repository layout +================= + +- **Microservices** (backend): ``services/*`` + - ``services/device-manager`` — register/select devices and handle device comms + - ``services/exam-manager`` — plan, schedule, track, and review exams + - ``services/mri/sequence-manager`` — manage MRI sequences (inspect, configure) + - ``services/patient-manager`` — patient and study metadata + - ``services/user-login-manager`` — authentication and session handling + - ``services/workflow-manager`` — orchestration of reconstruction/processing jobs +- **Web UI** (frontend): ``scanhub-ui`` — single entry point for operators/researchers Why it exists ============= -Traditional MRI console workflows are costly to scale, hard to extend, and often siloed. ScanHub shifts reconstruction and processing tasks into a cloud-ready, modular architecture, enabling: +Traditional MRI console workflows are costly to scale, hard to extend, and siloed. ScanHub shifts reconstruction and processing tasks into a cloud-ready, modular architecture, enabling: -- **Scalability & flexibility** – run heavier workloads in the cloud, plug in your own microservices. +- **Scalability & flexibility** – heavy workloads run in the cloud; services can be swapped or extended. - **Open innovation** – avoid vendor lock-in; build on transparent, community-driven components. -- **Collaboration & sharing** – central data handling and standard formats encourage teamwork. -- **Interoperability** – sequence, device and workflow managers target open standards and cross-manufacturer use. +- **Collaboration & sharing** – central data handling and standard formats support teamwork. +- **Interoperability** – open interfaces across device, exam, and sequence managers. Key building blocks =================== -- **Device Manager** – register/select devices (incl. simulated devices). -- **Exam Manager** – plan acquisitions and review completed results. -- **MRI Sequences Manager** – manage and inspect sequences. -- **Workflow Engine** – orchestrates reconstruction/processing jobs. -- **Web UI (scanhub-ui)** – single entry point for operators and researchers. +- **Device Manager** (``services/device-manager``) +- **Exam Manager** (``services/exam-manager``) +- **MRI Sequence Manager** (``services/mri/sequence-manager``) +- **Patient Manager** (``services/patient-manager``) +- **User Login Manager** (``services/user-login-manager``) +- **Workflow Manager** (``services/workflow-manager``) +- **Web UI** (``scanhub-ui``) Licensing ========= -ScanHub is **dual-licensed**: GPLv3 **or** a commercial license from BRAIN-LINK UG. Choose GPLv3 for open-source use; choose commercial to embed without copyleft obligations and to obtain premium services. (See the “ScanHub” page for details.) +ScanHub is **dual-licensed**: GPLv3 **or** a commercial license from BRAIN-LINK UG. Choose GPLv3 for open-source use; choose commercial to embed without copyleft obligations and to obtain premium services. diff --git a/docs/source/index.rst b/docs/source/index.rst index 17e35d77..978d6bd0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,8 +11,8 @@ Developed in response to the limitations of traditional MRI infrastructure — s ScanHub enables efficient management and utilization of MRI data. By relocating image reconstruction and storage to the cloud, it reduces operational cost, enhances scalability, and fosters collaboration across MRI research and clinical domains. -Documentation Overview ----------------------- +Overview +-------- .. toctree:: :maxdepth: 1