API as a config option

Added a config option to enable the API routes. By default it is not on.