Add a get api to the server to get all devices.