That would trigger a double render error since 'new' API requests redirects are handled on its base controller https://github.com/theforeman/foreman/blob/develop/app/controllers/api/base_controller.rb