This function allows an entity to access the historic data.

        Args:
            entity        (string): Name of the device to listen to
            query_filters (string): Elastic search response format string
                                    example, "pretty=true&size=10"

def db(self, entity, query_filters="size=10"):
        """ This function allows an entity to access the historic data.

        Args:
            entity        (string): Name of the device to listen to
            query_filters (string): Elastic search response format string
                                    example, "pretty=true&size=10"
        """
        if self.entity_api_key == "":
            return {'status': 'failure', 'response': 'No API key found in request'}

        historic_url = self.base_url + "api/0.1.0/historicData?" + query_filters
        historic_headers = {
            "apikey": self.entity_api_key,
            "Content-Type": "application/json"
        }

        historic_query_data = json.dumps({
            "query": {
                "match": {
                    "key": entity
                }
            }
        })

        with self.no_ssl_verification():
            r = requests.get(historic_url, data=historic_query_data, headers=historic_headers)
        response = dict()
        if "No API key" in str(r.content.decode("utf-8")):
            response["status"] = "failure"
        else:
            r = r.content.decode("utf-8")
            response = r
        return response