After calling /api/system/restart the server should restart. However there is a delay between the request and real server shutdown. During this period calling /api/system/status returns status: "UP".
Because of the problem there is no reliable way to restart the server from web, there is no way to know if server already restarted or didn't shutdown yet.
The WS should return different status than "UP", for example "RESTARTING".