jsonrpc: cleanup JSON-RPC API definition