Using API for replicating files.