I have created custom module to provide REST API endpoints. Created REST resource plugin using
drupal generate:plugin:rest:resource. In order to configure that api endpoint, I need to edit the file: rest.settings.yml or intsall REST UI and enable and configure it.

My concern is can I do the enable and configure in my custom module itself by code ? so that once module in installed the API end points are ready to use.

Comments

slewazimuth’s picture

Yes, you can do it all in code so when you're custom module is successfully installed its ready to use.