fix url building for rest interface