add "api" line to make customized api work. and also use getLogs.