diff --git a/src/sipcentric/__init__.py b/src/sipcentric/__init__.py index d45d63a..87acb02 100644 --- a/src/sipcentric/__init__.py +++ b/src/sipcentric/__init__.py @@ -187,7 +187,9 @@ class APIObject(object): def url(self, parent=None): if self._data: if 'uri' in self._data: - return self._data['uri'] + path = urllib.parse.urlparse(self._data['uri']).path + if path.startswith("/api/v1"): + return path[7:] return self.__class__.makeUrl(self.id, parent)