Cutoff data from source index to destination index

We are re-indexing data in ES cluster 7.17 from a live source index to newly created target index, is there a way to copy the entire data till the endtime of re-indexing API? so that while switching to the new index all the data of the previous index is reindexed to new index and as soon as the reindexing is completed, we can switch the user to new index, this will help us to migrate to the new index with zero downtime.

We are using the API: POST https://localhost:9200/_reindex to reindex the data

No, that is not possible. The reindex process will reindex the data that is present in the index when it starts.