exam-manager.app.api.workflow_api#
Definition of exam API endpoints accessible through swagger UI.
Attributes#
Functions#
|
Create new workflow. |
Create new workflow from template. |
|
|
Get a workflow. |
Get all existing workflows of a certain exam. |
|
Get all workflow templates. |
|
|
Delete a workflow. Cascade delete the associated tasks. |
|
Update an existing workflow. |
Module Contents#
- exam-manager.app.api.workflow_api.workflow_router#
- async exam-manager.app.api.workflow_api.create_workflow(payload: scanhub_libraries.models.BaseWorkflow, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.WorkflowOut #
Create new workflow.
Parameters#
- payload
Workflow pydantic input model
Returns#
Workflow pydantic output model
Raises#
- HTTPException
404: Creation unsuccessful
- async exam-manager.app.api.workflow_api.create_workflow_from_template(exam_id: uuid.UUID, template_id: uuid.UUID, new_workflow_is_template: bool, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.WorkflowOut #
Create new workflow from template.
Parameters#
- exam_id
Id of the exam, the workflow is related to
- template_id
ID of the template, the workflow is created from
- new_workflow_is_template
set the is_template property of the new workflow and its tasks
Returns#
Workflow pydantic output model
Raises#
- HTTPException
404: Creation unsuccessful
- async exam-manager.app.api.workflow_api.get_workflow(workflow_id: uuid.UUID | str, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.WorkflowOut #
Get a workflow.
Parameters#
- workflow_id
Id of the workflow to be returned
Returns#
Workflow pydantic output model
Raises#
- HTTPException
404: Not found
- async exam-manager.app.api.workflow_api.get_all_exam_workflows(exam_id: uuid.UUID | str, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) list[scanhub_libraries.models.WorkflowOut] #
Get all existing workflows of a certain exam.
Parameters#
- exam_id
Id of parent exam
Returns#
List of workflow pydantic output model
- async exam-manager.app.api.workflow_api.get_all_workflow_templates(user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) list[scanhub_libraries.models.WorkflowOut] #
Get all workflow templates.
Returns#
List of workflow pydantic output model
- async exam-manager.app.api.workflow_api.delete_workflow(workflow_id: uuid.UUID | str, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) None #
Delete a workflow. Cascade delete the associated tasks.
Parameters#
- workflow_id
Id of the workflow to be deleted
Raises#
- HTTPException
404: Not found
- async exam-manager.app.api.workflow_api.update_workflow(workflow_id: uuid.UUID | str, payload: scanhub_libraries.models.BaseWorkflow, user: Annotated[scanhub_libraries.models.User, Depends(get_current_user)]) scanhub_libraries.models.WorkflowOut #
Update an existing workflow.
Parameters#
- workflow_id
Id of the workflow to be updated
- payload
Workflow pydantic indput model
Returns#
Workflow pydantic output model
Raises#
- HTTPException
404: Not found