Added generic call api function that returns a dictionary.