REST: changes for cleaning up operations
(cherry picked from commit 7bf593a6c8a5d6d92535a9701a084f607c8884b7)