Could try and use the katello_api gem here instead of hard-coded paths.