Framework for server api in JSON RPC