Updated API to /edit_sample and /publish_sample