abstract api call