This video explains the step-by-step process on how to publish a task flow using Rest API
For further information, refer to the following documents:
https://knowledge.informatica.com/s/article/HOW-TO-Publish-a-task-flow-using-Rest-API?language=en_US
https://docs.informatica.com/cloud-common-services/administrator/current-version/rest-api-reference/data-integration-rest-api/taskflows/publishing-taskflows-in-bulk.html