Updatecollection api modified from v1 to v2 and publish functinality implemented.