[REST] Split get nodes in two functions, get swithches and get sensors