Commit 7f52b161 authored by zeroleak's avatar zeroleak
Browse files

API: add POST /rest/cli/restart

parent b037bbb8
......@@ -253,6 +253,8 @@ Payload:
}
```
### restart: ```POST /rest/cli/restart```
### get config: ```GET /rest/cli/config```
### set config: ```PUT /rest/cli/config```
......
......@@ -100,4 +100,14 @@ public class CliController extends AbstractRestController {
// success
return state(headers);
}
@RequestMapping(value = CliApiEndpoint.REST_CLI_RESTART, method = RequestMethod.POST)
public ApiCliStateResponse restart(@RequestHeader HttpHeaders headers) throws Exception {
checkHeaders(headers);
Application.restart();
// success
return state(headers);
}
}
......@@ -7,6 +7,7 @@ public class CliApiEndpoint {
public static final String REST_CLI_INIT = REST_PREFIX + "cli/init";
public static final String REST_CLI_LOGIN = REST_PREFIX + "cli/login";
public static final String REST_CLI_LOGOUT = REST_PREFIX + "cli/logout";
public static final String REST_CLI_RESTART = REST_PREFIX + "cli/restart";
public static final String REST_CLI_CONFIG = REST_PREFIX + "cli/config";
public static final String REST_POOLS = REST_PREFIX + "pools";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment