wei.routers.workflow_routes

Router for the “runs” endpoints

Functions

get_run(run_id)

Pulls the status of a workflow run

get_wf_file(run_id, filename)

Returns a specific file from a workflow run's result directory.

get_wf_files(run_id)

Returns the list of files in a given workflow run's result directory.

log_run_return(run_id)

start_run(experiment_id, workflow[, ...])

parses the payload and workflow files, and then pushes a workflow job onto the redis queue

wei.routers.workflow_routes.get_run(run_id: str) WorkflowRun

Pulls the status of a workflow run

Parameters:

run_id (str) – The programmatically generated id of the workflow

Returns:

response (WorkflowRun) – a WorkflowRun object for the requested run_id

async wei.routers.workflow_routes.get_wf_file(run_id: str, filename: str) FileResponse

Returns a specific file from a workflow run’s result directory.

async wei.routers.workflow_routes.get_wf_files(run_id: str) Dict

Returns the list of files in a given workflow run’s result directory.

async wei.routers.workflow_routes.log_run_return(run_id: str) str
Parameters:
  • job_id (str) – The queue job id for the job being logged

  • experiment_path (str) – The path to the data for the experiment for the workflow

Returns:

response (str) – a string with the log data for the run requested

async wei.routers.workflow_routes.start_run(experiment_id: Annotated[str, Form(PydanticUndefined)], workflow: Annotated[str, Form(PydanticUndefined)], payload: Annotated[str | None, Form(PydanticUndefined)] = None, simulate: Annotated[bool | None, Form(PydanticUndefined)] = False, validate_only: Annotated[bool | None, Form(PydanticUndefined)] = False, files: list[UploadFile] = []) WorkflowRun

parses the payload and workflow files, and then pushes a workflow job onto the redis queue

Parameters:
  • workflow (UploadFile)

  • - The workflow yaml file

  • payload (Optional[Dict[str, Any]] = {})

  • - Dynamic values to insert into the workflow file

  • experiment_id (str)

  • - The id of the experiment this workflow is associated with

  • simulate (bool)

  • - whether to use real robots or not

  • validate_only (bool)

  • - whether to validate the workflow without queueing it

Returns:

  • response (WorkflowRun)

  • - a workflow run object for the requested run_id