Separating the logic for creating and publishing APIs