[api] some more refactoring of requests and fixes for groups
[api] fix ruby 2.0 reported problems