def post_data(self, body, log_type):
        """Build and send a request to the POST API.

        Args:
            body (str): Data to post into Sentinel log analytics workspace
            log_type (str): Custom log table name in which data wil be added.

        Returns:
            status_code: Returns the response status code got while posting data to sentinel.
        """
        __method_name = inspect.currentframe().f_code.co_name
        method = "POST"
        content_type = "application/json"
        resource = "/api/logs"
        rfc1123date = datetime.datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
        content_length = len(body)
        try:
            signature = self.build_signature(
                rfc1123date,
                content_length,
                method,
                content_type,
                resource,
            )
        except Exception as err:
            applogger.error(
                "{}(method={}) : {} : Error occurred: {}".format(
                    LOGS_STARTS_WITH, __method_name, COFENSE_TO_SENTINEL, err
                )
            )
            raise CofenseException("Error while generating signature for posting data into log analytics.")
        uri = "https://" + WORKSPACE_ID + ".ods.opinsights.azure.com" + resource + "?api-version=2016-04-01"

        headers = {
            "content-type": content_type,
            "Authorization": signature,
            "Log-Type": log_type,
            "x-ms-date": rfc1123date,
        }
        try:
            response = requests.post(uri, data=body, headers=headers)
            if response.status_code >= 200 and response.status_code <= 299:
                applogger.debug(
                    "{}(method={}) : {} : Status_code: {} Accepted: Data Posted\
                          Successfully to microsoft sentinel.".format(
                        LOGS_STARTS_WITH,
                        __method_name,
                        COFENSE_TO_SENTINEL,
                        response.status_code,
                    )
                )
                return response.status_code
            else:
                raise CofenseException(
                    "Response code: {} from posting data to log analytics.\nError: {}".format(
                        response.status_code, response.content
                    )
                )
        except CofenseException as error:
            applogger.error(
                "{}(method={}) : {} : Error:{}".format(LOGS_STARTS_WITH, __method_name, COFENSE_TO_SENTINEL, error)
            )
            raise CofenseException("CofenseException: Error while posting data to sentinel.")
        except Exception as error:
            applogger.error(
                "{}(method={}) : {} : Error:{}".format(LOGS_STARTS_WITH, __method_name, COFENSE_TO_SENTINEL, error)
            )
            raise CofenseException("Exception: Error while posting data to sentinel.")
Build and send a request to the POST API.

        Args:
            body (str): Data to post into Sentinel log analytics workspace
            log_type (str): Custom log table name in which data wil be added.

        Returns:
            status_code: Returns the response status code got while posting data to sentinel.
        
Solutions/CofenseTriage/Data Connectors/CofenseTriageDataConnector/CofenseBasedIndicatorCreator/sentinel.py