diff options
-rwxr-xr-x | muck_poc | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -64,6 +64,11 @@ class MuckAPI: 'callback': self._check_authz( 'GET', 'show', self._search_res), }, + { + 'method': 'GET', + 'path': '/status', + 'callback': self._show_status, + }, ] for route in routes: @@ -134,6 +139,13 @@ class MuckAPI: } return bottle.HTTPResponse(status=200, body=json.dumps(result)) + def _show_status(self): + ms = self._store.get_memory_store() + status = { + 'resources': len(ms) + } + return bottle.HTTPResponse(status=200, body=json.dumps(status)) + def _get_json_body(self): f = bottle.request.body body = f.read() |