moved getDeviceAlarms to APIController