adds rest urls to access database objects and implements view function to require an API key