def METHOD_NAME(apikey,sar_url, s, d, agents):
    # Set system_id, deployment_uuid
    system_id = s
    deployment_uuid = d
    agent_ids = None
    if agents is not None:
        agent_ids = agents.split(",")
    print("agent_ids", agent_ids)
    description = "Wazuh regular scan"
    title = "Wazuh SCA scan"
    # Get SAR from SAR Service
    print(SPACER)
    print(f"Retrieving SAR from service: {sar_url}")
    sar_list = []
    # Retrieve Wazuh SCA scan for each agent
    for agent_id in agent_ids:
        # Variables
        endpoint = f'/sca/{agent_id}?pretty=true'
        base_url = f"{PROTOCOL}://{HOST}:{PORT}"
        login_url = f"{base_url}/security/user/authenticate"
        basic_auth = f"{USER}:{PASSWORD}".encode()
        headers = {'Authorization': f'Basic {b64encode(basic_auth).decode()}'}
        print(json.dumps(get_response(login_url, headers), indent=4, sort_keys=True))
        headers['Authorization'] = f'Bearer {get_response(login_url, headers)["data"]["token"]}'
        #Request
        response = get_response(base_url + endpoint, headers)
        # print(json.dumps(response, indent=4, sort_keys=True))
        if len(response["data"]["affected_items"]) == 1:
            agent_result = response["data"]["affected_items"][0]
            # Enhance agent result
            agent_result['agent'] = agent_id
            agent_result['ip_address'] = None
            agent_result['url_link'] = f"{PROTOCOL}://{HOST}/app/wazuh#/overview/?tab=sca&agentId={agent_id}"
            sar_list.append(agent_result)
        else:
            agent_result = None
        print("agent_result from wazuh",json.dumps(agent_result, indent=4, sort_keys=True))
    # Build SAR object
    sar = {'schema': 'GovReadySimpleSAR',
           'version': '0.2',
           "metadata": {
                "deployment_uuid": f"{deployment_uuid}",
                "description": f"{description}",
                "last-modified": "dateTime-with-timezone",
                "published": "dateTime-with-timezone",
                "schema": "GovReadySimpleSAR",
                "system_id": f"{system_id}",
                "title": f"{title}",
                "version": "0.2"
            },
           'sar':sar_list
    }
    print("sar", json.dumps(sar, indent=4, sort_keys=True))
    # Build query
    url_query = endpoint
    if deployment_uuid is not None:
        d_uuid_uuid = uuid.UUID(f'urn:uuid:{deployment_uuid}')
    else:
        d_uuid_uuid = None
    # Submit sar data to GovReady-q API
    data = {
        "system_id": system_id,
        "deployment_uuid": d_uuid_uuid,
        "sar_json": json.dumps(sar)
    }
    from pprint import pprint
    # pprint(data)
    data = bytes( parse.urlencode( data ).encode() )
    # POST retrieved SAR data to GovReady-Q via API
    """
    curl --header "Authorization: <api_key>" \
    -F "name=test_sar_api" \
    -F "system_id=86" \
    -F "deployment_id=23" \
    -F "data=@controls/data/test_data/test_sar1.json" \
    localhost:8000/api/v1/systems/86/assessment/new
    """
    # Prepare headers
    headers = {
                "Authorization": f"{apikey}"
              }
    # Set GovReady URL
    gr_api_url = f"{GOVREADYHOST}/api/v1/systems/{system_id}/assessment/new"
    print(SPACER)
    print(f"Posting retrieved SAR to: {gr_api_url}")
    # Post to GovReady
    req = request.Request( gr_api_url, data=data, headers=headers, method="POST" );
    response = request.urlopen(req)
    response.read()
    print(SPACER)
    print(response.read())