sitecore 9 : after migrating from Sitecore 8.1 to Sitecore 9.1 ItemWebAPI is not working

Hi,

 

We are migrating Sitecore 8.1  to Sitecore 9 .1 , In old code the sitecore data is fetched with JQuery ajax using ItemWEbAPI as below

var query = "/Sitecore/Content/Repository/Products/*";

/-/item/v1?wfe=1&query=" + encodeURIComponent(query)

 

aftet the upgrading Sitecore 9.1 above code is not working.

any one have idea how we can do it after upgrade.