Thanks @Jineet_VoraThere is a small change to your answer but thanks for pointing me.
When a user edits an OSGI config, a copy is written by AEM at `/apps/system/config` . The config needs to be deleted from here, using below command. And on deleting this, if there is code for this configuration, then the default osgi configuration is created again using the default values as specified in code.
The path of the actual osgi configuration will be deployed by code at /apps/myproject/config/com.myproject.aem.core.services.impl.ApiSettingsService
On editing the config, a new node is created by AEM at /apps/system/config/com.myproject.aem.core.services.impl.ApiSettingsService.config