adding method to retrieve rest url