Get an endpoint by address

def get_endpoint_by_address(self, endpoint_addr):
        """
        Get an endpoint by address
        """
        url = "/notification/v1/endpoint?endpoint_address={}".format(
            endpoint_addr)

        response = NWS_DAO().getURL(url, self._read_headers)

        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)
        try:
            return self._endpoint_from_json(data.get("Endpoints")[0])
        except IndexError:
            raise DataFailureException(url, 404, "No SMS endpoint found")