Turned the publish_api into a batch operation