modified manager-rest's publish api and fixed tests