diff --git a/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/TaskController.groovy b/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/TaskController.groovy index d72da84bfb..b5891cd641 100644 --- a/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/TaskController.groovy +++ b/orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/TaskController.groovy @@ -151,10 +151,12 @@ class TaskController { @RequestMapping(value = "/pipelines", method = RequestMethod.GET) List listLatestPipelines( @RequestParam(value = "pipelineConfigIds") String pipelineConfigIds, + @RequestParam(value = "limit", required = false) Integer limit, @RequestParam(value = "statuses", required = false) String statuses) { statuses = statuses ?: ExecutionStatus.values()*.toString().join(",") + limit = limit ?: 1 def executionCriteria = new ExecutionRepository.ExecutionCriteria( - limit: 1, + limit: limit, statuses: (statuses.split(",") as Collection) )