def pull_and_push_the_snapshot_data(
        self,
        endpoint,
        table_name,
        hashed_events_list=list(),
        hash_field_list=[],
        fields=None,
    ):
        """To pull the snapshot type data from vectra and push into sentinel."""
        __method_name = inspect.currentframe().f_code.co_name
        posted_event_count = 0
        res = self.pull_data(endpoint)
        if res and len(res):
            if endpoint == consts.HEALTH_ENDPOINT:
                link_status_dict, aggregated_peak_traffic_dict = {}, {}
                connectivity_dict, trafficdrop_dict = {}, {}

                # for link_status
                for k, v in res.get("network", {}).get("interfaces", {}).get("sensors", {}).items():
                    link_status = "UP"
                    for x, y in v.items():
                        if y.get("link", "") != "UP":
                            link_status = "Degraded"
                            break
                    link_status_dict[k] = link_status

                # for aggregated_peak_traffic
                for key, value in res.get("network", {}).get("traffic", {}).get("sensors", {}).items():
                    aggregated_peak_traffic_dict[key] = value.get("aggregated_peak_traffic_mbps", "")

                # for connectivity status and error
                for item in res.get("connectivity", {}).get("sensors", {}):
                    connectivity_dict[item.get("name", "")] = {
                        "status": item.get("status", ""),
                        "error": item.get("error", ""),
                    }

                # for traffic_drop status and error
                for item in res.get("trafficdrop", {}).get("sensors", {}):
                    trafficdrop_dict[item.get("name", "")] = {
                        "status": item.get("status", ""),
                        "error": item.get("error", ""),
                    }

                for i in range(len(res.get("sensors", {}))):
                    # adding d_link_status
                    res["sensors"][i]["d_link_status"] = link_status_dict.get(
                        res.get("sensors", {})[i].get("luid", ""), ""
                    )
                    # adding d_aggregated_peak_traffic
                    res["sensors"][i]["d_aggregated_peak_traffic"] = aggregated_peak_traffic_dict.get(
                        res.get("sensors", {})[i].get("name", ""), ""
                    )
                    # adding d_connectivity_status
                    res["sensors"][i]["d_connectivity_status"] = connectivity_dict.get(
                        res.get("sensors", {})[i].get("name", ""), {}
                    ).get("status", "")
                    # adding d_connectivity_error
                    res["sensors"][i]["d_connectivity_error"] = connectivity_dict.get(
                        res.get("sensors", {})[i].get("name", ""), {}
                    ).get("error", "")
                    # adding d_trafficdrop_status
                    res["sensors"][i]["d_trafficdrop_status"] = trafficdrop_dict.get(
                        res.get("sensors", {})[i].get("name", ""), {}
                    ).get("status", "")
                    # adding d_trafficdrop_error
                    res["sensors"][i]["d_trafficdrop_error"] = trafficdrop_dict.get(
                        res.get("sensors", {})[i].get("name", ""), {}
                    ).get("error", "")

                list_res = [res]
                self.post_data_to_sentinel(list_res, table_name, fields)
                posted_event_count += 1
            else:
                for event in res:
                    temp_dict = {}
                    for field in hash_field_list:
                        temp_dict[field] = event.get(field)
                    hash_of_event = self.get_results_hash(temp_dict)
                    if hash_of_event not in hashed_events_list:
                        self.post_data_to_sentinel(event, table_name, fields)
                        posted_event_count += 1
                        hashed_events_list.append(hash_of_event)
                        self.save_checkpoint_snapshot(hashed_events_list)

        self.applogger.info(
            "{}(method={}) : {} : Posted total {} event(s) into MS Sentinel. No more events."
            " Stopping the collection.".format(
                consts.LOGS_STARTS_WITH,
                __method_name,
                self.function_name,
                posted_event_count,
            )
        )
To pull the snapshot type data from vectra and push into sentinel.
Solutions/Vectra XDR/Data Connectors/VectraDataConnector/SharedCode/collector.py