We are doing content migration want to create tool using below approach please give your valuable suggestions.
Developing this tool there is huge in items and many items are modified but not published after adding latest changes so in that case old version item content is on published page.
In that case we don't want to use content port and want to publish the correct version item to keep in sync.
Check components and pages for last modified and last published to live time stamp.
If last published date is less than the last modified time of the item then marking it as a draft item.
take one previous version of the item and compare it's last modified date with last published timestamp. If last modified date is less than published date then want to revert back this version of item.
Revert back items to its correct previous version by creating a newer version of the item modified timestamp changes and has to be pick.
Planning to create tool using core service please let me know which API to use.