Restart Job
Resubmit a finished job so a worker runs it again.
Use this tool to retry a job that failed for a transient reason, such as a backend outage or an expired device credential, without rebuilding the payload. The job keeps its original inputs and identifier.
When to Use:
- Call this after
get_job_results_and_statusreports a job in an error or cancelled state that is worth retrying. - Call this when the user asks to rerun or retry a specific job.
Constraints:
- Only finished jobs can be restarted. Restarting a job that is still
submitted or running fails with
409. - Restarting reruns the original inputs. Submit a new job instead when parameters need to change.
- This consumes quota exactly like a fresh submission.
Notes:
- A restart preserving a stale device credential will fail the same way again; check the job logs before retrying an authentication failure.
Args: job_id: Job identifier returned by a prior MCP submission or listing tool. user: Authenticated user resolved from the API key. db: Active database session.
Returns: The job identifier, its status after resubmission, and the next polling step.
Raises:
HTTPException: Raised with 404 when the job is not available to the
caller, or 409 when the job has not finished yet.
Authorizations
Path Parameters
Response
Successful Response
Represent the outcome of a job lifecycle action such as cancel or restart.
Attributes: job_id: Identifier of the affected job. status: Job status after the action was applied. context: Summary of what changed and the recommended next step.