Skip to content

Commit

Permalink
feat(kayenta): expose pagination param on reports endpoint (#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Aug 25, 2020
1 parent c5c7f56 commit 986f976
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -103,10 +103,11 @@ class V2CanaryController {
@RequestMapping(value = '/{application}/executions', method = RequestMethod.GET)
List getCanaryResultsByApplication(@PathVariable String application,
@RequestParam(value='limit') int limit,
@RequestParam(value='page', defaultValue='1') int page,
@ApiParam('Comma-separated list of statuses, e.g.: RUNNING, SUCCEEDED, TERMINAL')
@RequestParam(value='statuses', required = false) String statuses,
@RequestParam(value='storageAccountName', required = false) String storageAccountName) {
v2CanaryService.getCanaryResultsByApplication(application, limit, statuses, storageAccountName)
v2CanaryService.getCanaryResultsByApplication(application, limit, page, statuses, storageAccountName)
}

// TODO(dpeach): remove this endpoint when a Kayenta endpoint for
Expand Down
Expand Up @@ -101,9 +101,9 @@ class V2CanaryService {
}
}

List getCanaryResultsByApplication(String application, int limit, String statuses, String storageAccountName) {
List getCanaryResultsByApplication(String application, int limit, int page, String statuses, String storageAccountName) {
try {
return kayentaService.getCanaryResultsByApplication(application, limit, statuses, storageAccountName)
return kayentaService.getCanaryResultsByApplication(application, limit, page, statuses, storageAccountName)
} catch (RetrofitError error) {
throw classifyError(error)
}
Expand Down
Expand Up @@ -74,6 +74,7 @@ interface KayentaService {
@GET("/canary/executions")
List getCanaryResultsByApplication(@Query("application") String application,
@Query("limit") int limit,
@Query("page") int page,
@Query("statuses") String statuses,
@Query("storageAccountName") String storageAccountName)

Expand Down

0 comments on commit 986f976

Please sign in to comment.