Refactor url attribute to uri

It's better to construct the uri in the class constructor, instead
of constructing it in every single REST method