Fixing build failures in rest endpoint