Are you seeing this in the simulator or from within Tableau? There isn't anything that limits the number of rows brought back into Tableau. In the simulator I believe there a few checks to make sure you don't accidentally bring back too much data during development.
It is possible that there is a limit from the data source. Are you able to find any error messages that are through from the API you are accessing?
Thank you very much for the response. I am not getting any error messages from API and it is working fine in Simulator. I am getting the following error only from Tableau desktop:
Version of tableau desktop is 9.1.0. Is this related to my desktop version? Should I upgrade it?
I would definitely recommend upgrading if that is an option! There are some bug fixes we have made in recent releases that wouldn't be in 9.1.0, so it's never a bad thing to try if possible.
The other thing you can do is look into the log files of Tableau in order to find a more helpful error message. The one returned by the connector "Error in get column headers" is not very helpful, and it may be hiding a more helpful error message.
There are some instructions on how to get those logs (and some other helpful tips!) in this video, I would highly recommend: Debugging Tips & Tricks - YouTube