The endpoints that were used previously are now deprecated and removed. This commit uses the query language instead of the endpoint to provide the same set of features. fix #1058.
Fix #1032