Update api query due to deprecation