| |
|
| |
|
| | This document outlines the API endpoints for managing individual run instances in PySpur.
|
| |
|
| |
|
| |
|
| | **Description**: Retrieves detailed information about a specific run, including its status, inputs, outputs, and associated tasks.
|
| |
|
| | **URL**: `/run/{run_id}/`
|
| |
|
| | **Method**: GET
|
| |
|
| | **Parameters**:
|
| | ```python
|
| | run_id: str
|
| | ```
|
| |
|
| | **Response Schema**:
|
| | ```python
|
| | class RunResponseSchema(BaseModel):
|
| | id: str
|
| | workflow_id: str
|
| | workflow_version_id: Optional[str]
|
| | workflow_version: Optional[WorkflowVersionResponseSchema]
|
| | status: RunStatus
|
| | start_time: datetime
|
| | end_time: Optional[datetime]
|
| | initial_inputs: Optional[Dict[str, Dict[str, Any]]]
|
| | outputs: Optional[Dict[str, Dict[str, Any]]]
|
| | tasks: List[TaskResponseSchema]
|
| | parent_run_id: Optional[str]
|
| | run_type: str
|
| | output_file_id: Optional[str]
|
| | input_dataset_id: Optional[str]
|
| | message: Optional[str]
|
| | duration: Optional[float]
|
| | percentage_complete: float
|
| | ```
|
| |
|
| |
|
| |
|
| | **Description**: Lists all runs across all workflows with pagination support, ordered by start time descending. This provides a global view of all workflow executions in the system.
|
| |
|
| | **URL**: `/run/`
|
| |
|
| | **Method**: GET
|
| |
|
| | **Query Parameters**:
|
| | ```python
|
| | page: int
|
| | page_size: int
|
| | ```
|
| |
|
| | **Response Schema**:
|
| | ```python
|
| | List[RunResponseSchema]
|
| | ```
|
| |
|
| |
|
| |
|
| | **Description**: Retrieves all tasks associated with a specific run, showing the execution details of each node in the workflow.
|
| |
|
| | **URL**: `/run/{run_id}/tasks/`
|
| |
|
| | **Method**: GET
|
| |
|
| | **Parameters**:
|
| | ```python
|
| | run_id: str
|
| | ```
|
| |
|
| | **Response Schema**:
|
| | ```python
|
| | List[TaskResponseSchema]
|
| | ```
|
| |
|
| | Where `TaskResponseSchema` contains:
|
| | ```python
|
| | class TaskResponseSchema(BaseModel):
|
| | id: str
|
| | run_id: str
|
| | node_id: str
|
| | node_type: str
|
| | status: TaskStatus
|
| | start_time: Optional[datetime]
|
| | end_time: Optional[datetime]
|
| | inputs: Optional[Dict[str, Any]]
|
| | outputs: Optional[Dict[str, Any]]
|
| | error: Optional[str]
|
| | is_downstream_of_pause: bool
|
| | ```
|
| |
|
| |
|
| |
|
| | **Description**: Permanently deletes a run and all its associated tasks. This operation cannot be undone.
|
| |
|
| | **URL**: `/run/{run_id}/`
|
| |
|
| | **Method**: DELETE
|
| |
|
| | **Parameters**:
|
| | ```python
|
| | run_id: str
|
| | ```
|
| |
|
| | **Response**: 204 No Content
|
| |
|
| |
|
| |
|
| | **Description**: Retrieves all child runs of a parent run, useful for tracking nested workflow executions.
|
| |
|
| | **URL**: `/run/{run_id}/children/`
|
| |
|
| | **Method**: GET
|
| |
|
| | **Parameters**:
|
| | ```python
|
| | run_id: str
|
| | ```
|
| |
|
| | **Response Schema**:
|
| | ```python
|
| | List[RunResponseSchema]
|
| | ``` |