[REST] Post-Merge overhaul of the REST API

For now i think it make sense to just change the -rest command. Changing the -server command in this pull would mix things up.