Magento multi-webste stores configuration

Hi,

  1. If magento has multiple websites configuration, each with the subdomain (e.g. fr.magento.io, en.magento.io), is it possible to override the magento url and rest api url to make it store specific in the default json configuration file? (a bit simlar to elasticsearch possibility of overdding to store specific).

  2. If magento has multiple websites but using the “Add store code to Urls” set to “Y”, meaning each website / store has specific base url (e.g. from rest/v1/stores/storeConfig). How this is configured in config file in store api? Should I put the default store magento url for the magento 2 configs?

Just want to understand what is current practice within the community. Any advice?

Ashvin