add restart api for task