Add url() endpoint to return the url that represents a resource

Closes/replaces #87