Added generic api call handling and manual test.