Is there any way that we can restrict metadata in case of DX API's

What kind of metadata you mean? If you don’t use DX part of API and interested only in data part you can restrict uiResource being returned on response.