def post_data(events: list[dict], log_type_suffix: str):
    """Build and send a request to the POST API"""
    body = json.dumps(events)
    method = "POST"
    content_type = "application/json"
    resource = "/api/logs"
    rfc1123date = datetime.now(tz=timezone.utc).strftime("%a, %d %b %Y %H:%M:%S GMT")
    content_length = len(body)
    signature = _build_signature(
        rfc1123date, content_length, method, content_type, resource
    )
    log_type = f"FncEvents{log_type_suffix.title()}"

    headers = {
        "content-type": content_type,
        "Authorization": signature,
        "Log-Type": log_type,
        "x-ms-date": rfc1123date,
    }
    response = requests.post(LOG_ANALYTICS_URI, data=body, headers=headers)
    if response.status_code >= 200 and response.status_code <= 299:
        logging.info(f"SentinelClient: posted {len(events)} events to {log_type}")
    else:
        logging.error(
            f"SentinelClient: failed to post events to Sentinel. Response code: {response.status_code}"
        )
        raise requests.exceptions.HTTPError(
            f"SentinelClient: failed to post events to Sentinel. Response code: {response.status_code}"
        )
Build and send a request to the POST API
Solutions/Fortinet FortiNDR Cloud/Data Connectors/fortinetFortiNdrCloudDataConn/sentinel/sentinel.py