Fixes #3000 : Add api Rest

need to be rebased ... code is quite ugly in management.html page