I don't think this should be in the API - it is only used by the UI, and doesn't make sense for users of the API.   Since the icon is calculated anyways, perhaps we should create a front-end version of https://github.com/theforeman/foreman/blob/develop/app/helpers/operatingsystems_helper.rb#L9-L71 ?