Re #7240 Fix import issue and API v1 code