I think there is a helper for this, `api_resource` or something like that, not sure if it is in katello in foreman. @tstrachota?