api calls with json input : support json & integer