@echo off rem prepating connection parameters set JAVA_RUN=java -cp xpologClient.jar com.xpolog.sdk.client.XpoLogSDKClient set XPOLOG_CONN=-xpologURL http://localhost:30303/logeye -user admin -password admin rem changing ports, activating security, setting agent mode rem %JAVA_RUN% %XPOLOG_CONN% -api settings -httpPort 30304 -sslPort 30444 -ajpPort 8010 -agentMode true -activateSecurity true rem applying license rem %JAVA_RUN% %XPOLOG_CONN% -api license -files C:\license.lic rem updating admin user password rem %JAVA_RUN% %XPOLOG_CONN% -api securityUsers -name admin -userPassword admin123 -displayName "Admin" -override true rem adding a remote XpoLog account rem %JAVA_RUN% %XPOLOG_CONN% -api addRemoteXpoLogAccount -enabled false -override true -name "SDK TEST" -hostName localhost -conType HTTP -port 30303 -context logeye -override true -enabled true -isCollected true -username sdk -userPassword sdk rem modifying the existing remote XpoLog 'xpolog-cloud' account rem %JAVA_RUN% %XPOLOG_CONN% -api addRemoteXpoLogAccount -override true -name xpolog-cloud -description example-description rem add a Log Sync task rem %JAVA_RUN% %XPOLOG_CONN% -api addSyncLogTask -name "LogSync" -override true -parentFolderPath "" -cron "" -description "this is the task desc" rem applying a patch rem %JAVA_RUN% %XPOLOG_CONN% -api addPatch -type api -files C:\4018.zip rem restarting XpoLog rem %JAVA_RUN% %XPOLOG_CONN% -api restart rem Exectue Email Task rem %JAVA_RUN% %XPOLOG_CONN% -api executeTask -name "EMAIL TEST" rem create account test-server rem %JAVA_RUN% %XPOLOG_CONN% -api addSSHAccount -name "test-server" -override true -hostName 0.0.0.0 -username USER -userPassword PASSWORD -conType SFTP -privateKeyPath "" rem disable account test-server rem %JAVA_RUN% %XPOLOG_CONN% -api enableAccount -name "test-server" -enabled true rem enable account test-server rem %JAVA_RUN% %XPOLOG_CONN% -api removeAccount -name "test-server" rem execute scanner %JAVA_RUN% %XPOLOG_CONN% -api executeScanTask -name "sdk-test-server" -parentFolderPath "ROOT->test->test-server" -scanPath "/var/log" -accountName test-server -id 123456 -filesToInclude auth*,syslog*,cron* -subdirsScanLevel 10 -timeZone GMT -onlineLogsApplication TEST-SDK if errorlevel 1 ( echo Exit with error goto END ) echo API completed successully :END pause