finish the download api