api#current_role method

This is needed for an upcoming fix for CLI