Class JobApiController

java.lang.Object
com.bluebell.greenhouse.planter.controllers.job.JobApiController

@RestController @RequestMapping("${bluebell.base.api.controller.endpoint}/job") @CrossOrigin(origins="*", methods={GET,DELETE,POST,PUT}) public class JobApiController extends Object
API controller for Job.
Version:
3.0.6
Author:
Stephen Prizio
  • 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 identifier
      severity - optional severity code
      page - page number
      pageSize - 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 identifier
      reason - 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