code to populate device db and REST endpoint for returning all devices