The index method of the API controller should probably be calling this - https://github.com/Katello/katello/blob/roles/app/controllers/katello/api/v2/gpg_keys_controller.rb#L40