Skip to content

Commit

Permalink
feat(md): expose status of resource (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
emjburns committed Sep 12, 2019
1 parent 88d8500 commit 71ba578
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ List<Map<String, Object>> getResourceEvents(
@GET("/resources/{name}")
Resource getResource(@Path("name") String name);

@GET("/resources/{name}/status")
String getResourceStatus(@Path("name") String name);

@POST("/resources")
Resource upsertResource(@Body Resource resource);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ Resource getResource(@PathVariable("name") String name) {
return keelService.getResource(name);
}

@ApiOperation(value = "Get status of a resource", response = Resource.class)
@RequestMapping(value = "/resources/{name}/status", method = GET)
String getResourceStatus(@PathVariable("name") String name) {
return keelService.getResourceStatus(name);
}

@ApiOperation(value = "Create or update a resource", response = Resource.class)
@RequestMapping(value = "/resources", method = POST)
Resource upsertResource(@RequestBody Resource resource) {
Expand Down

0 comments on commit 71ba578

Please sign in to comment.