the correct way to call a service in a controller is to inject it as a dependency into a controller, and then we can utilize the service object to invoke its methods.
REST stands for Representational State Transfer, It's a kind of Application Programming Interface that provides access to system resources through HTTP protocol. REST API uses the following methods to access data from REST Server.
We can either use drush en `module_name` command or can enable a module from the administrator dashboard. but let's see the step-wise process of doing that.