Added functions to implement different API calls.