Getting the required information from the API.

def get_resource(self, path):
        """Getting the required information from the API."""
        response = self._http_request(path)
        try:
            return response.json()
        except ValueError:
            raise exception.ServiceException("Invalid service response.")