Class JobApiController
java.lang.Object
com.bluebell.greenhouse.planter.controllers.job.JobApiController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<JobCommandResultDTO> cancelJobAttempt(String jobId) Requests cooperative cancellation.org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadJobArtifact(String artifactId) Downloads one artifact through the separately authorized operator route.org.springframework.http.ResponseEntity<PaginatedActionEventDTO> getActionExecutionEvents(String executionId, String severity, int page, int pageSize) Returns a bounded page of operator-facing action events.org.springframework.http.ResponseEntity<JobAttemptDetailDTO> getJobAttempt(String jobId) Returns one durable attempt addressed by its stable public UUID.org.springframework.http.ResponseEntity<JobSubmissionDTO> retryJobAttempt(String jobId, String reason) Creates a linked immutable retry attempt.org.springframework.http.ResponseEntity<PaginatedJobSummaryDTO> searchJobSummaries(JobSearchRequest searchRequest) Searches bounded operator summaries without action output, logs, or events.
-
Constructor Details
-
JobApiController
public JobApiController()
-
-
Method Details
-
searchJobSummaries
@GetMapping("/operator/search") public org.springframework.http.ResponseEntity<PaginatedJobSummaryDTO> searchJobSummaries(@ModelAttribute JobSearchRequest searchRequest) Searches bounded operator summaries without action output, logs, or events.- Parameters:
searchRequest- operator search request- Returns:
- bounded summary page
-
getJobAttempt
@GetMapping("/attempts/{jobId}") public org.springframework.http.ResponseEntity<JobAttemptDetailDTO> getJobAttempt(@PathVariable String jobId) Returns one durable attempt addressed by its stable public UUID.- Parameters:
jobId- public job identifier- Returns:
- attempt detail
-
getActionExecutionEvents
@GetMapping("/executions/{executionId}/events") public org.springframework.http.ResponseEntity<PaginatedActionEventDTO> getActionExecutionEvents(@PathVariable String executionId, @RequestParam(required=false) String severity, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="25") int pageSize) Returns a bounded page of operator-facing action events.- Parameters:
executionId- public execution identifierseverity- optional severity codepage- page numberpageSize- page size- Returns:
- event page
-
downloadJobArtifact
@GetMapping("/artifacts/{artifactId}") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadJobArtifact(@PathVariable String artifactId) Downloads one artifact through the separately authorized operator route.- Parameters:
artifactId- public artifact identifier- Returns:
- artifact content
-
retryJobAttempt
@PostMapping("/attempts/{jobId}/retry") public org.springframework.http.ResponseEntity<JobSubmissionDTO> retryJobAttempt(@PathVariable String jobId, @RequestParam(defaultValue="Manual operator retry") String reason) Creates a linked immutable retry attempt.- Parameters:
jobId- public selected attempt identifierreason- operator reason- Returns:
- accepted submission
-
cancelJobAttempt
@PutMapping("/attempts/{jobId}/cancel") public org.springframework.http.ResponseEntity<JobCommandResultDTO> cancelJobAttempt(@PathVariable String jobId) Requests cooperative cancellation.- Parameters:
jobId- public job identifier- Returns:
- resulting lifecycle state
-