This issue was observed in an engineering environment when the controller was overloaded and ONTAP was not in a healthy state. Since the information about snapshots is not cached, and is queried real-time, adding to the API-S timeout of 1 minute(by default), the API call was failing.
The team is exploring the option of making the timeout configurable. However, for now, you can verify the health of ONTAP., reduce the load or try running the API calls sequentially so ONTAP is not loaded with parallel requests.
Thanks and Regards,