refator cat metric api