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

You may also be interested in Security of Constellation applications