def get_ip_data_from_foundation_api(self, ip_list, watchlist_flag=False):
        """To get IP data from Foundation API.

        Args:
            ip_list (list): A list of IPs to retrieve details from foundation API.
            watchlist_flag (bool, optional): A flag indicating whether the IPs are from a watchlist.
                                            Defaults to False.
        Raises:
            TeamCymruScoutException: If an error occurs while retrieving or sending the IP data.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            applogger.debug("{}(method={}) Getting data from Foundation API.".format(self.logs_starts_with, __method_name))
            ip_chunks = self.divide_chunks(ip_list)
            for list_indicator in ip_chunks:
                valid_ip_values = self.validate_ip_values(list_indicator)
                if len(valid_ip_values) > 0:
                    foundation_response = self.rest_helper_obj.make_rest_call(
                        endpoint=consts.IP_FOUNDATION_ENDPOINT,
                        params={"ips": ",".join(ips for ips in valid_ip_values)},
                    )
                    foundation_data = foundation_response.get("data", [])
                    if len(foundation_data) == 0:
                        applogger.info(
                            "{}(method={}) No Foundation data found for {} IPs.".format(
                                self.logs_starts_with, __method_name, valid_ip_values
                            )
                        )
                        continue
                    for ip_details in foundation_data:
                        self.add_tags(ip_details)
                    self.rest_helper_obj.send_data_to_sentinel(
                        foundation_data,
                        "{}_{}".format(consts.IP_TABLE_NAME, "Foundation"),
                        consts.AZURE_DATA_COLLECTION_RULE_ID_MAIN_TABLES,
                        indicator_value=valid_ip_values,
                    )
                if watchlist_flag:
                    self.checkpoint_obj.save_checkpoint(data=list_indicator[-1], indicator_type="ip")
        except requests.exceptions.Timeout as error:
            applogger.error(
                self.error_logs.format(
                    self.logs_starts_with,
                    __method_name,
                    consts.TIME_OUT_ERROR_MSG.format(error),
                )
            )
            raise requests.exceptions.Timeout()
        except Exception as err:
            applogger.error(self.error_logs.format(self.logs_starts_with, __method_name, err))
            raise TeamCymruScoutException()
To get IP data from Foundation API.

        Args:
            ip_list (list): A list of IPs to retrieve details from foundation API.
            watchlist_flag (bool, optional): A flag indicating whether the IPs are from a watchlist.
                                            Defaults to False.
        Raises:
            TeamCymruScoutException: If an error occurs while retrieving or sending the IP data.
        
Solutions/Team Cymru Scout/Data Connectors/TeamCymruScout/IPDataCollector/ip_collector.py