COOPR-581: Implement node hours REST API

please add some comments, it is not totally straightforward what is going on in this method.