def METHOD_NAME(request):
    # Stop Wazuh and Wazuh API
    svcs.control_service('stop')
    # Reset api.log and start a new monitor
    truncate_file(fw.API_LOG_FILE_PATH)
    file_monitor = FileMonitor(fw.API_LOG_FILE_PATH)
    setattr(request.module, 'wazuh_log_monitor', file_monitor)
    # Start Wazuh API
    svcs.control_service('start')
    evm.check_api_start_log(file_monitor)