Added ManagementConsole API and some missing tests.

shouldn't it decode the JSON to get an array instead of encoding it ?