Making REST endpoints more json friendly

input & output of the REST api is more json friendly now.

Removing unnecessary  json dumps / loads
psycopg2 does an auto conversion of types. Need not bother about
converting to & from json <-> dict types