Revised v2 role endpoints and added tests. bugid:112438