def pull(self, url, params=None, data=None, auth=None, method="GET"):
        """Will pull data from each API.

        Args:
            url (str): _description_
            params (json, optional): _description_. Defaults to None.
            data (json, optional): _description_. Defaults to None.
            auth (json, optional): _description_. Defaults to None.
            method (str, optional): _description_. Defaults to "GET".

        Raises:
            Exception: _description_
            Exception: _description_
            Exception: _description_

        Returns:
            _type_: _description_
        """
        try:
            __method_name = inspect.currentframe().f_code.co_name
            self.applogger.debug(
                "{}(method={}) : {} request: url='{}' version='{}'".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.function_name,
                    url,
                    self.session.headers["User-Agent"],
                )
            )
            if method == "POST":
                res = self.session.post(
                    url=url,
                    auth=auth,
                    params=params,
                    data=data,
                    timeout=consts.API_TIMEOUT,
                )
            else:
                res = self.session.get(
                    url=url,
                    auth=auth,
                    params=params,
                    data=data,
                    timeout=consts.API_TIMEOUT,
                )

            if res.status_code == 401:
                self.applogger.warning(
                    "{}(method={}) : {} : Access token is invalid. generating new token.".format(
                        consts.LOGS_STARTS_WITH, __method_name, self.function_name
                    )
                )
                if not self.is_token_expired(self.access_token_expiration) and not self.is_token_expired(
                    self.refresh_token_expiration
                ):
                    self.generate_access_token(from_refresh_token=False)
                else:
                    self.validate_access_token()
                return True, None
            elif res and res.status_code in [200, 201]:
                self.applogger.debug(
                    '{}(method={}) : {} : API call: Response received successfully. url="{}" params="{}"'.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.function_name,
                        url,
                        params,
                    )
                )
                self.update_checkpoint_of_disabling_function(make_count_zero=True)
                return False, res.json()

            elif res.status_code in [400, 403, 404]:
                self.applogger.error(
                    "{}(method={}) : {} : API call: response: url={} status_code={} response={}".format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.function_name,
                        url,
                        res.status_code,
                        res.text,
                    )
                )
                self.update_checkpoint_of_disabling_function()
                raise Exception
            else:
                self.applogger.error(
                    "{}(method={}) : {} : API call: Unknown status code or empty "
                    'response: url="{}" status_code="{}" response="{}"'.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.function_name,
                        url,
                        res.status_code,
                        res.text,
                    )
                )
                raise Exception("Received unknown status code or empty response.")
        except requests.exceptions.RequestException as ex:
            if res.status_code == 404:
                self.applogger.debug(
                    '{}(method={}) : {} : API call: Got {} Status Code : url="{}"'
                    ' response="{}"'.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.function_name,
                        url,
                        ex.response.status_code,
                        ex.response.text,
                    )
                )
                return {}
            else:
                self.applogger.error(
                    '{}(method={}) : {} : API call: Unsuccessful response: url="{}" status_code="{}"'
                    ' response="{}"'.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.function_name,
                        url,
                        ex.response.status_code,
                        ex.response.text,
                    )
                )
                raise Exception("HTTP Error Occurred while getting response from api.")
        except Exception as ex:
            self.applogger.error(
                '{}(method={}) : {} : API call: Unexpected error while API call url="{}" error="{}"'.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.function_name,
                    url,
                    str(ex),
                )
            )
            raise Exception("Error Occurred while getting response from api.")
Will pull data from each API.

        Args:
            url (str): _description_
            params (json, optional): _description_. Defaults to None.
            data (json, optional): _description_. Defaults to None.
            auth (json, optional): _description_. Defaults to None.
            method (str, optional): _description_. Defaults to "GET".

        Raises:
            Exception: _description_
            Exception: _description_
            Exception: _description_

        Returns:
            _type_: _description_
        
Solutions/Vectra XDR/Data Connectors/VectraDataConnector/SharedCode/collector.py