exam-manager.app.api.result_api#
Definition of result API endpoints accessible through swagger UI.
Attributes#
Functions#
|
Create a task result. |
|
Get an existing result. |
|
Get all existing results of a certain task. |
|
Delete a task. |
|
Update an existing result. |
|
Upload a DICOM file to a result. |
Module Contents#
- exam-manager.app.api.result_api.result_router#
- async exam-manager.app.api.result_api.create_result(payload: scanhub_libraries.models.BaseResult, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.ResultOut #
Create a task result.
Parameters#
- payload
Result pydantic input model
Returns#
Result pydantic output model
Raises#
- HTTPException
404: Creation unsuccessful
- async exam-manager.app.api.result_api.get_result(result_id: uuid.UUID | str, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.ResultOut #
Get an existing result.
Parameters#
- result_id
Id of the result to be returned
Returns#
Result pydantic output model
Raises#
- HTTPException
404: Not found
- async exam-manager.app.api.result_api.get_all_task_results(task_id: uuid.UUID | str, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) list[scanhub_libraries.models.ResultOut] #
Get all existing results of a certain task.
Parameters#
- task_id
Id of parental task
Returns#
List of task pydantic output model
- async exam-manager.app.api.result_api.delete_result(result_id: uuid.UUID | str, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) None #
Delete a task.
Parameters#
- task_id
Id of the task to be deleted
Raises#
- HTTPException
404: Not found
- async exam-manager.app.api.result_api.update_result(result_id: uuid.UUID | str, payload: scanhub_libraries.models.BaseResult, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.ResultOut #
Update an existing result.
Parameters#
- result_id
Id of the result to be updated
- payload
Result pydantic base model/dict If this is the pydantic ResultBase model, only fields in the base model can be updated.
Returns#
Task pydantic output model
Raises#
- HTTPException
404: Not found
- async exam-manager.app.api.result_api.upload_dicom(result_id: uuid.UUID | str, file: fastapi.UploadFile, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) None #
Upload a DICOM file to a result.
Parameters#
- result_id
UUID of the result
- file
Dicom file
- user
User for authentification
Raises#
- HTTPException
Throws error if ID of the result is unknown